spec/integration/xmcare_spec.rb in roqua-healthy-1.5.10 vs spec/integration/xmcare_spec.rb in roqua-healthy-1.5.11
- old
+ new
@@ -213,9 +213,19 @@
it 'returns the street with suffix appended' do
expect(subject[:street]).to eq("Straatnaam 123ab")
end
end
+
+ describe 'a patient with no PID.11 (address) or PID.13 (phone) at all' do
+ before { load_fixture 'xmcare_missing_whole_pids', '12345678901' }
+ subject { Roqua::Healthy::A19.fetch("12345678901") }
+
+ it 'loads the rest' do
+ expect(subject[:firstname]).to eq("Babette")
+ 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)