Skip to content

Commit

Permalink
fix backend tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Vakmeth committed Oct 2, 2023
1 parent 1c5daea commit 5c1da1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions backend/src/test/java/ch/puzzle/okr/KeyResultTestHelpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import ch.puzzle.okr.models.User;
import ch.puzzle.okr.models.checkin.CheckIn;
import ch.puzzle.okr.models.checkin.CheckInMetric;
import ch.puzzle.okr.models.checkin.Zone;
import ch.puzzle.okr.models.keyresult.KeyResult;
import ch.puzzle.okr.models.keyresult.KeyResultMetric;
import ch.puzzle.okr.models.keyresult.KeyResultOrdinal;
Expand All @@ -32,7 +33,7 @@ public class KeyResultTestHelpers {
public static final String TARGET_ZONE = "Ein Baum";
public static final String STRETCH_ZONE = "Ein Wald";
public static final String QUARTER_LABEL = "GJ 22/23-Q4";
public static final String LAST_CHECK_IN_ZONE = "Baum";
public static final Zone LAST_CHECK_IN_ZONE = Zone.COMMIT;
public static final String FIRSTNAME = "Johnny";
public static final String LASTNAME = "Appleseed";
public static final String START_DATE = "-999999999-01-01";
Expand All @@ -56,7 +57,7 @@ public class KeyResultTestHelpers {
public static final String JSON_PATH_TARGET_ZONE = "$.targetZone";
public static final String JSON_PATH_STRETCH_ZONE = "$.stretchZone";
public static final String JSON_PATH_LAST_CHECK_IN_ID = "$.lastCheckIn.id";
public static final String JSON_PATH_LAST_CHECK_IN_ZONE = "$.lastCheckIn.zone";
public static final String JSON_PATH_LAST_CHECK_IN_ZONE = "$.lastCheckIn.value";
public static final String JSON_PATH_QUARTER_LABEL = "$.objective.keyResultQuarterDto.label";
public static final String JSON_PATH_QUARTER_START_DATE = "$.objective.keyResultQuarterDto.startDate";
public static final String JSON = "{\"title\": \"Keyresult 1\",\"keyResultType\": \"metric\"}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void shouldGetOrdinalKeyResultWithId() throws Exception {
.andExpect(jsonPath(JSON_PATH_OBJECTIVE_ID, Is.is(OBJECTIVE_ID)))
.andExpect(jsonPath(JSON_PATH_OBJECTIVE_STATE, Is.is(OBJECTIVE_STATE_ONGOING)))
.andExpect(jsonPath(JSON_PATH_QUARTER_LABEL, Is.is(QUARTER_LABEL)))
.andExpect(jsonPath(JSON_PATH_LAST_CHECK_IN_ZONE, Is.is(LAST_CHECK_IN_ZONE)))
.andExpect(jsonPath(JSON_PATH_LAST_CHECK_IN_ZONE, Is.is(LAST_CHECK_IN_ZONE.toString())))
.andExpect(jsonPath(JSON_PATH_LAST_CHECK_IN_CONFIDENCE, Is.is(CONFIDENCE)))
.andExpect(jsonPath(JSON_PATH_CREATED_ON, Is.is(KEY_RESULT_CREATED_ON)))
.andExpect(jsonPath(JSON_PATH_COMMIT_ZONE, Is.is(COMMIT_ZONE)))
Expand Down Expand Up @@ -214,7 +214,7 @@ void createKeyResultWithEnumKeys() throws Exception {
.andExpect(jsonPath(JSON_PATH_KEY_RESULT_TYPE, Is.is(KEY_RESULT_TYPE_ORDINAL)))
.andExpect(jsonPath(JSON_PATH_OWNER_FIRSTNAME, Is.is(FIRSTNAME)))
.andExpect(jsonPath(JSON_PATH_OBJECTIVE_STATE, Is.is(OBJECTIVE_STATE_ONGOING)))
.andExpect(jsonPath(JSON_PATH_LAST_CHECK_IN_ZONE, Is.is(LAST_CHECK_IN_ZONE)))
.andExpect(jsonPath(JSON_PATH_LAST_CHECK_IN_ZONE, Is.is(LAST_CHECK_IN_ZONE.toString())))
.andExpect(jsonPath(JSON_PATH_LAST_CHECK_IN_CONFIDENCE, Is.is(CONFIDENCE)))
.andExpect(jsonPath(JSON_PATH_CREATED_ON, Is.is(KEY_RESULT_CREATED_ON)))
.andExpect(jsonPath(JSON_PATH_COMMIT_ZONE, Is.is(COMMIT_ZONE)))
Expand Down

0 comments on commit 5c1da1d

Please sign in to comment.