Skip to content

Commit

Permalink
Update tests to check expiration date functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
robi1467 committed Apr 1, 2020
1 parent 9c02b3f commit cc512d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/src/test/java/umm3601/note/NoteControllerSpec.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public void setupEach() throws IOException {
" }"));
testNotes.add(Document.parse("{\n" +
" message: \"But we're leaving\",\n" +
" owner_id: \"1523\",\n" +
" expiration: \"2021-03-27T04:52:37.888Z\",\n" +
" owner_id: \"1310\",\n" +
" expiration: \"2019-03-27T04:52:37.888Z\",\n" +

" }"));
testNotes.add(Document.parse("{\n" +
Expand Down Expand Up @@ -132,7 +132,7 @@ public void GetNotesByOwner_id() throws IOException {

String result = ctx.resultString();
Note[] resultNotes = JavalinJson.fromJson(result, Note[].class);

// there are two notes with the id'1310' but one should be deleted since it is "expired"
assertEquals(1, resultNotes.length); // There should be one owner returned
for (Note note : resultNotes) {
assertEquals("1310", note.owner_id); // There should be one with that id
Expand Down

0 comments on commit cc512d1

Please sign in to comment.