class Crucible::Tests::ReadTest
Public Class Methods
new(client1, client2=nil)
click to toggle source
Calls superclass method
Crucible::Tests::BaseTest::new
# File lib/tests/suites/read_test.rb, line 13 def initialize(client1, client2=nil) super(client1, client2) @category = {id: 'core_functionality', title: 'Core Functionality'} end
Public Instance Methods
description()
click to toggle source
# File lib/tests/suites/read_test.rb, line 9 def description 'Initial Sprinkler tests (R001, R002, R003, R004) for testing basic READ requests.' end
id()
click to toggle source
# File lib/tests/suites/read_test.rb, line 5 def id 'ReadTest' end
setup()
click to toggle source
# File lib/tests/suites/read_test.rb, line 18 def setup # try to find a patient begin response = @client.read_feed(FHIR::Patient) @patient = response.resource.entry.first.resource rescue # try to create a patient begin @patient = FHIR::Patient.create(name: { family: 'Emerald', given: 'Caro' }) @patient_created = true rescue @patient = nil end end end
teardown()
click to toggle source
# File lib/tests/suites/read_test.rb, line 34 def teardown ignore_client_exception { @patient.destroy if @patient_created } end