Skip to content

Commit f398bdb

Browse files
author
Rupert Westenthaler
committed
MORE-Platform#385: Looks like this bug was possible because the assertion in the relevant unit test was the wrong way!
1 parent 933e58d commit f398bdb

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

studymanager-services/src/test/java/io/redlink/more/studymanager/repository/goals/GoalConfigurationRepositoryTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,12 @@ void testDoImportGoalTopic() {
322322
GoalTopic reImported = goalConfigurationRepository.doImport(studyB, updatedVersion);
323323

324324
assertThat(reImported.getStudyId()).isEqualTo(studyB);
325-
assertThat(reImported.getTitle()).isEqualTo("Updated - Drink More Water");
325+
//it is expected that it is NOT overridden if already existing. So the old title is expected
326+
assertThat(reImported.getTitle()).isEqualTo("Drink Water");
326327

328+
//validate also directly in the DB
327329
assertThat(goalConfigurationRepository.getTopic(studyB, "hydration").getTitle())
328-
.isEqualTo("Updated - Drink More Water");
330+
.isEqualTo("Drink Water");
329331
}
330332

331333
@Test

0 commit comments

Comments
 (0)