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

OZG-7515 add migration test

parent de38fcd1
No related branches found
No related tags found
1 merge request!11Ozg 7515 migrate patch item command
......@@ -125,7 +125,6 @@ class M014_AddItemNameBescheidToPatchAttachedItemCommandITCase {
@Nested
class TestBuildQuery {
@Test
void shouldQueryPatchAttachedItemCommandsWithParentId() {
var query = migration.buildQuery(List.of(sendBescheidCommand.getObjectId(ID_FIELD).toString()));
......@@ -136,6 +135,19 @@ class M014_AddItemNameBescheidToPatchAttachedItemCommandITCase {
}
}
@Nested
class TestUpdateDocuments {
@Test
void shouldModifyPatchAttachedBescheidItem() {
migration.updateDocuments(mongoOperations, List.of(sendBescheidCommand.getObjectId(ID_FIELD).toString()));
var command = migrationDbTestUtils.getCommand(patchAttachedItemCommand.getObjectId(ID_FIELD));
assertThat(command).usingRecursiveComparison().isEqualTo(buildExpectedPatchAttachedItemCommand(patchAttachedItemCommand));
}
}
@Nested
class TestFullMigration {
@Test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment