fix graph-ql tests

This commit is contained in:
Grahame Grieve 2019-06-19 04:55:21 +10:00
parent c8beb27d59
commit c002d5b5d1
1 changed files with 65 additions and 33 deletions

View File

@ -3,47 +3,79 @@
"instance-tests" : { "instance-tests" : {
"simple" : { "simple" : {
"description" : "Just a simple test of the basic graphQL engine: a simple query on a known patient (example, from the spec)", "description" : "Just a simple test of the basic graphQL engine: a simple query on a known patient (example, from the spec)",
"url" : "/Patient/example/$graphql?query={identifier{system,value}active,name{text,given,family}}", "url" : "/Patient/example/$graphql?query={identifier{system,value}active,name{text,given,family}}"
"output" : { "output" : {
"data" : { "data" : {
"identifier":[{ "active" : true,
"system":"urn:oid:1.2.36.146.595.217.0.1", "identifier" : [
"value":"12345" {
}], "system" : "urn:oid:1.2.36.146.595.217.0.1",
"active":true, "value" : "12345"
"name":[{ }
"given":["Peter","James"], ],
"family":"Chalmers" "name" : [
},{ {
"given":["Jim"] "family" : "Chalmers",
},{ "given" : [
"given":["Peter","James"], "Peter",
"family":"Windsor" "James"
}] ]
}} },
{
"given" : [
"Jim"
]
},
{
"family" : "Windsor",
"given" : [
"Peter",
"James"
]
}
]
}
},
} }
}, },
"root-tests" : { "root-tests" : {
"simple" : { "simple" : {
"description" : "Just a simple test of the basic graphQL engine: a simple query on a known patient (example, from the spec)", "description" : "Just a simple test of the basic graphQL engine: a simple query on a known patient (example, from the spec)",
"url" : "/$graphql?query={Patient(id:example){identifier{system,value}active,name{text,given,family}}}", "url" : "/$graphql?query={Patient(_id:example){identifier{system,value}active,name{text,given,family}}}"
"output" : { "output" : {
"data" : { "data" : {
"identifier":[{ "Patient" : {
"system":"urn:oid:1.2.36.146.595.217.0.1", "active" : true,
"value":"12345" "identifier" : [
}], {
"active":true, "system" : "urn:oid:1.2.36.146.595.217.0.1",
"name":[{ "value" : "12345"
"given":["Peter","James"], }
"family":"Chalmers" ],
},{ "name" : [
"given":["Jim"] {
},{ "family" : "Chalmers",
"given":["Peter","James"], "given" : [
"family":"Windsor" "Peter",
}] "James"
}} ]
},
{
"given" : [
"Jim"
]
},
{
"family" : "Windsor",
"given" : [
"Peter",
"James"
]
}
]
}
}
},
} }
} }
} }