spec/integration/xmcare_spec.rb in roqua-healthy-1.5.9 vs spec/integration/xmcare_spec.rb in roqua-healthy-1.5.10
- old
+ new
@@ -205,9 +205,17 @@
it 'returns nil' do
expect(subject[:phone_cell]).to be_nil
end
end
+ describe 'a patient with an address suffix' do
+ before { load_fixture 'xmcare_house_number_addendum', '1234567890' }
+ subject { Roqua::Healthy::A19.fetch("1234567890") }
+
+ it 'returns the street with suffix appended' do
+ expect(subject[:street]).to eq("Straatnaam 123ab")
+ end
+ end
describe 'a patient that does not exist' do
before { load_fixture 'xmcare_patient_not_found', '12345678901' }
it 'raises PatientNotFound' do
expect { Roqua::Healthy::A19.fetch("12345678901") }.to raise_error(Roqua::Healthy::PatientNotFound)