Skip to content

Commit

Permalink
Fix backend tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lkleisa committed Apr 29, 2024
1 parent 5af8d7c commit 12622a7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void shouldBuildAlignmentCorrectObjective() {

Alignment returnAlignment = ObjectiveAlignment.Builder.builder().withAlignedObjective(objectiveAlignedObjective)
.withTargetObjective(objective1).build();
Alignment alignment = alignmentBusinessService.buildAlignmentModel(objectiveAlignedObjective);
Alignment alignment = alignmentBusinessService.buildAlignmentModel(objectiveAlignedObjective, 0);

assertEquals(returnAlignment, alignment);
assertTrue(alignment instanceof ObjectiveAlignment);
Expand All @@ -157,7 +157,7 @@ void shouldBuildAlignmentCorrectKeyResult() {

Alignment returnAlignment = KeyResultAlignment.Builder.builder().withAlignedObjective(keyResultAlignedObjective)
.withTargetKeyResult(metricKeyResult).build();
Alignment alignment = alignmentBusinessService.buildAlignmentModel(keyResultAlignedObjective);
Alignment alignment = alignmentBusinessService.buildAlignmentModel(keyResultAlignedObjective, 0);

assertEquals(returnAlignment, alignment);
assertTrue(alignment instanceof KeyResultAlignment);
Expand All @@ -166,7 +166,7 @@ void shouldBuildAlignmentCorrectKeyResult() {
@Test
void shouldThrowErrorWhenAlignedEntityIdIsIncorrect() {
OkrResponseStatusException exception = assertThrows(OkrResponseStatusException.class,
() -> alignmentBusinessService.buildAlignmentModel(wrongAlignedObjective));
() -> alignmentBusinessService.buildAlignmentModel(wrongAlignedObjective, 0));

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

Expand Down

0 comments on commit 12622a7

Please sign in to comment.