Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Read test fix #190

Merged
merged 2 commits into from
Jan 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/tests/suites/read_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def id
end

def description
'Initial Sprinkler tests (R001, R002, R003, R004) for testing basic READ requests.'
'Initial Sprinkler tests (R001, R002, R003, R004, R005) for testing basic READ requests.'
end

def initialize(client1, client2=nil)
Expand All @@ -16,14 +16,15 @@ def initialize(client1, client2=nil)
end

def setup
@resources = Crucible::Generator::Resources.new(fhir_version)
# try to find a patient
begin
response = @client.read_feed(get_resource(:Patient))
@patient = response.resource.entry.first.resource
rescue
# try to create a patient
begin
@patient = get_resource(:Patient).new(meta: { tag: [{ system: 'http://projectcrucible.org', code: 'testdata'}] }, name: { family: 'Emerald', given: 'Caro' })
@patient = @client.create(@resources.example_patient).resource
@patient_created = true
rescue
@patient = nil
Expand Down