From f55212361d6126a05075a1f00f3915484b4f334e Mon Sep 17 00:00:00 2001 From: Marvin Bertin Date: Tue, 10 Oct 2017 17:05:32 -0700 Subject: add json format tests for Slot and Eligibility arms --- .../formats/json/sprayformats/PatientIssueFormatSuite.scala | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientIssueFormatSuite.scala') diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientIssueFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientIssueFormatSuite.scala index 1e2a11e..2776dcc 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientIssueFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/PatientIssueFormatSuite.scala @@ -22,13 +22,14 @@ class PatientIssueFormatSuite extends FlatSpec with Matchers { ) val writtenJson = patientIssueWriter.write(patientIssue) - writtenJson should be( - """{"id":10,"userId":"userId-001","lastUpdate":"2017-08-10T18:00Z","isDraft":false, + writtenJson should be("""{"id":10,"userId":"userId-001","lastUpdate":"2017-08-10T18:00Z","isDraft":false, "text":"message text","archiveRequired":false}""".parseJson) - val createPatientIssueJson = """{"text":"message text"}""".parseJson + val createPatientIssueJson = """{"text":"message text"}""".parseJson val expectedCreatedPatientIssue = patientIssue.copy(id = LongId(0), lastUpdate = LocalDateTime.MIN, isDraft = true) - val parsedCreatePatientIssue = jsValueToPatientIssue(createPatientIssueJson, UuidId("40892a07-c638-49d2-9795-1edfefbbcc7c"), StringId("userId-001")) + val parsedCreatePatientIssue = jsValueToPatientIssue(createPatientIssueJson, + UuidId("40892a07-c638-49d2-9795-1edfefbbcc7c"), + StringId("userId-001")) parsedCreatePatientIssue should be(expectedCreatedPatientIssue) val updatePatientIssueJson = -- cgit v1.2.3