Skip to content

Commit

Permalink
Adding check and renamed test to clarify business rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrichlake committed Oct 6, 2023
1 parent 93d9779 commit bb4bf61
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class OrderTest extends Specification {
parsedJsonBody.patientId == expectedPatientId
}

def "payload file check"() {
def "check that contact info is added to order before sending to report stream"() {
when:
def response = orderClient.submit(labOrderJsonFileString, true)
def sentPayload = SentPayloadReader.read()
Expand All @@ -43,6 +43,7 @@ class OrderTest extends Specification {
parsedSentPayload.entry[0].resource.resourceType == "MessageHeader"
parsedSentPayload.entry[0].resource.eventCoding.code == "O21"
parsedSentPayload.entry[0].resource.eventCoding.display.contains("OML")
parsedSentPayload.entry[24].resource.contact.name.text.contains("SADIE S SMITH")

//test that everything else is the same except the MessageHeader's event
parsedSentPayload.entry[0].resource.remove("eventCoding")
Expand Down

0 comments on commit bb4bf61

Please sign in to comment.