DATAREST-1160 - Adapt tests to new CORS defaults in Spring Framework.
Spring Framework 5.0.2 changes the default for the Allow-Credentials header to false. We now adapted our test case to that and also drop the expectation to see the request URL in the Allow-Origin header as that is only returned if Allow-Credentials is true, which it now isn't by default.
This commit is contained in:
@@ -63,7 +63,7 @@ public class RepositoryCorsConfigurationAccessorUnitTests {
|
||||
CorsConfiguration configuration = accessor.createConfiguration(AnnotatedRepository.class);
|
||||
|
||||
assertThat(configuration).isNotNull();
|
||||
assertThat(configuration.getAllowCredentials()).isTrue();
|
||||
assertThat(configuration.getAllowCredentials()).isFalse();
|
||||
assertThat(configuration.getAllowedHeaders()).contains("*");
|
||||
assertThat(configuration.getAllowedOrigins()).contains("*");
|
||||
assertThat(configuration.getAllowedMethods(),
|
||||
|
||||
Reference in New Issue
Block a user