Sha256: 650b40fd852c337230ec38bee74cb70ab661b468a51a597e3d12986ccb501fea

Contents?: true

Size: 584 Bytes

Versions: 17

Compression:

Stored size: 584 Bytes

Contents

# frozen_string_literal: true
def stub_mirth(patient_id = '123')
  stub_request(:post, Roqua::Healthy.a19_endpoint)
    .with(body: {application: 'healthy', method: 'A19', patient_id: patient_id})
end

def stub_mirth_response(response, status = 200, patient_id = '123')
  stub_mirth(patient_id).to_return(status: status, headers: {}, body: response)
end

def load_fixture(name, patient_id = '123')
  fixture_filename = File.expand_path(File.join(__FILE__, "../../fixtures", "#{name}.xml"))
  response = File.read(fixture_filename)
  stub_mirth_response(response, 200, patient_id)
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
roqua-healthy-1.6.0 spec/support/fixtures.rb
roqua-healthy-1.5.13 spec/support/fixtures.rb
roqua-healthy-1.5.12 spec/support/fixtures.rb
roqua-healthy-1.5.11 spec/support/fixtures.rb
roqua-healthy-1.5.10 spec/support/fixtures.rb
roqua-healthy-1.5.9 spec/support/fixtures.rb
roqua-healthy-1.5.8 spec/support/fixtures.rb
roqua-healthy-1.5.7 spec/support/fixtures.rb
roqua-healthy-1.5.6 spec/support/fixtures.rb
roqua-healthy-1.5.5 spec/support/fixtures.rb
roqua-healthy-1.5.4 spec/support/fixtures.rb
roqua-healthy-1.5.3 spec/support/fixtures.rb
roqua-healthy-1.5.2 spec/support/fixtures.rb
roqua-healthy-1.5.1 spec/support/fixtures.rb
roqua-healthy-1.5.0 spec/support/fixtures.rb
roqua-healthy-1.4.3 spec/support/fixtures.rb
roqua-healthy-1.4.2 spec/support/fixtures.rb