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

Commit

Permalink
Merge pull request #190 from pedro-w/read-test-fix
Browse files Browse the repository at this point in the history
Read test fix
  • Loading branch information
arscan authored Jan 28, 2021
2 parents d051536 + bd57438 commit d3ac531
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit d3ac531

Please sign in to comment.