Skip to content
Snippets Groups Projects
Commit b20946e0 authored by Felix Reichenbach's avatar Felix Reichenbach
Browse files

Merge branch 'OZG-7907-ignore-new-fields-in-itcase' into 'main'

OZG-7907 fix itcase

See merge request !14
parents c269fdac 302ed7a3
Branches OZG-4094-Wiremock-ausprobieren
Tags
1 merge request!14OZG-7907 fix itcase
......@@ -106,6 +106,8 @@ class ReportingSettingITCase {
@Test
@SneakyThrows
void shouldAddAggregationMappings() {
var expectedAggregationMapping = AggregationMappingTestFactory.createBuilder().parent(null).status(null).scope(null).build();
mockMvc.perform(post("/api/configuration/aggregationMappings").with(csrf())
.contentType(MediaType.APPLICATION_JSON).content(TestUtils.loadTextFile("reporting/request.json")))
.andExpect(status().isCreated());
......@@ -113,7 +115,7 @@ class ReportingSettingITCase {
var collection = mongoOperations.getCollection(AggregationMapping.COLLECTION_NAME);
assertThat(collection.countDocuments()).isEqualTo(1);
var mapping = mongoOperations.findAll(AggregationMapping.class).getFirst();
assertThat(mapping).usingRecursiveComparison().ignoringFields("id").isEqualTo(AggregationMappingTestFactory.create());
assertThat(mapping).usingRecursiveComparison().ignoringFields("id").isEqualTo(expectedAggregationMapping);
}
@Test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment