aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentFormatSuite.scala
diff options
context:
space:
mode:
authorKseniya Tomskikh <ktomskih@datamonsters.co>2017-10-04 16:59:16 +0700
committerKseniya Tomskikh <ktomskih@datamonsters.co>2017-10-04 16:59:16 +0700
commit6f4de1ccfb6efe8f9ddbaec6551a9138a6efa6f8 (patch)
treeca4259be260ae1fc62aa06e69b6e1c9b4485b054 /src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentFormatSuite.scala
parenta321a978353439fc516b0f2016c28fb32ba1b7ae (diff)
downloadrest-query-6f4de1ccfb6efe8f9ddbaec6551a9138a6efa6f8.tar.gz
rest-query-6f4de1ccfb6efe8f9ddbaec6551a9138a6efa6f8.tar.bz2
rest-query-6f4de1ccfb6efe8f9ddbaec6551a9138a6efa6f8.zip
PDSUI-2268 Added institution field to document
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentFormatSuite.scala')
-rw-r--r--src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentFormatSuite.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentFormatSuite.scala
index 9394735..cc1832c 100644
--- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentFormatSuite.scala
+++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentFormatSuite.scala
@@ -24,6 +24,7 @@ class DocumentFormatSuite extends FlatSpec with Matchers {
typeId = Some(LongId(10)),
providerName = Some("provider 21"),
providerTypeId = Some(LongId(21)),
+ institutionName = Some("institution name"),
requiredType = Some(Document.RequiredType.OPN),
meta = None,
startDate = None,
@@ -33,7 +34,7 @@ class DocumentFormatSuite extends FlatSpec with Matchers {
writtenJson should be (
"""{"id":1,"recordId":101,"physician":"physician","typeId":10,"provider":"provider 21","providerTypeId":21,
- "requiredType":"OPN","startDate":null,"endDate":null,"status":"New","assignee":null,"previousStatus":null,
+ "requiredType":"OPN","institutionName":"institution name","startDate":null,"endDate":null,"status":"New","assignee":null,"previousStatus":null,
"previousAssignee":null,"lastActiveUser":null,"lastUpdate":"2017-08-10T18:00Z","meta":null}""".parseJson)
val createDocumentJson =
@@ -41,7 +42,8 @@ class DocumentFormatSuite extends FlatSpec with Matchers {
val expectedCreatedDocument = orig.copy(
id = LongId(0),
lastUpdate = LocalDateTime.MIN,
- requiredType = None
+ requiredType = None,
+ institutionName = None
)
val parsedCreatedDocument = documentFormat.read(createDocumentJson)
parsedCreatedDocument should be(expectedCreatedDocument)