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

OZG-7907 fix itcase

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