Skip to content

Commit 12622a7

Browse files
committed
Fix backend tests
1 parent 5af8d7c commit 12622a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/src/test/java/ch/puzzle/okr/service/business/AlignmentBusinessServiceTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void shouldBuildAlignmentCorrectObjective() {
145145

146146
Alignment returnAlignment = ObjectiveAlignment.Builder.builder().withAlignedObjective(objectiveAlignedObjective)
147147
.withTargetObjective(objective1).build();
148-
Alignment alignment = alignmentBusinessService.buildAlignmentModel(objectiveAlignedObjective);
148+
Alignment alignment = alignmentBusinessService.buildAlignmentModel(objectiveAlignedObjective, 0);
149149

150150
assertEquals(returnAlignment, alignment);
151151
assertTrue(alignment instanceof ObjectiveAlignment);
@@ -157,7 +157,7 @@ void shouldBuildAlignmentCorrectKeyResult() {
157157

158158
Alignment returnAlignment = KeyResultAlignment.Builder.builder().withAlignedObjective(keyResultAlignedObjective)
159159
.withTargetKeyResult(metricKeyResult).build();
160-
Alignment alignment = alignmentBusinessService.buildAlignmentModel(keyResultAlignedObjective);
160+
Alignment alignment = alignmentBusinessService.buildAlignmentModel(keyResultAlignedObjective, 0);
161161

162162
assertEquals(returnAlignment, alignment);
163163
assertTrue(alignment instanceof KeyResultAlignment);
@@ -166,7 +166,7 @@ void shouldBuildAlignmentCorrectKeyResult() {
166166
@Test
167167
void shouldThrowErrorWhenAlignedEntityIdIsIncorrect() {
168168
OkrResponseStatusException exception = assertThrows(OkrResponseStatusException.class,
169-
() -> alignmentBusinessService.buildAlignmentModel(wrongAlignedObjective));
169+
() -> alignmentBusinessService.buildAlignmentModel(wrongAlignedObjective, 0));
170170

171171
List<ErrorDto> expectedErrors = List.of(new ErrorDto("ATTRIBUTE_NOT_SET", List.of("alignedEntityId", "Hello")));
172172

0 commit comments

Comments
 (0)