Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • ozg-cloud/app/administration
1 result
Select Git revision
Show changes
Commits on Source (2)
...@@ -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
......