Skip to content

Commit d67bee1

Browse files
committed
Update test expectations for corrected error status codes
1 parent 55d811a commit d67bee1

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

modules/my_health/spec/requests/my_health/v2/allergies_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
get '/my_health/v2/medical_records/allergies',
150150
headers: { 'X-Key-Inflection' => 'camel' }
151151
end
152-
expect(response).to have_http_status(:bad_gateway)
152+
expect(response).to have_http_status(:service_unavailable)
153153
end
154154
end
155155
end
@@ -237,7 +237,7 @@
237237
get '/my_health/v2/medical_records/allergies/12345',
238238
headers: { 'X-Key-Inflection' => 'camel' }
239239
end
240-
expect(response).to have_http_status(:bad_gateway)
240+
expect(response).to have_http_status(:service_unavailable)
241241
end
242242
end
243243
end

modules/my_health/spec/requests/my_health/v2/clinical_notes_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
headers: { 'X-Key-Inflection' => 'camel' },
131131
params: default_params
132132
end
133-
expect(response).to have_http_status(:bad_gateway)
133+
expect(response).to have_http_status(:service_unavailable)
134134
end
135135

136136
it 'returns an error when start_date is invalid' do
@@ -283,7 +283,7 @@
283283
headers: { 'X-Key-Inflection' => 'camel' },
284284
params: { source: UnifiedHealthData::SourceConstants::ORACLE_HEALTH }
285285

286-
expect(response).to have_http_status(:bad_gateway)
286+
expect(response).to have_http_status(:service_unavailable)
287287
end
288288
end
289289
end

modules/my_health/spec/requests/my_health/v2/conditions_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
VCR.use_cassette('unified_health_data/get_conditions_200') do
9191
get path, headers: { 'X-Key-Inflection' => 'camel' }
9292
end
93-
expect(response).to have_http_status(:bad_gateway)
93+
expect(response).to have_http_status(:service_unavailable)
9494
end
9595
end
9696
end
@@ -147,7 +147,7 @@
147147
VCR.use_cassette('unified_health_data/get_conditions_200') do
148148
get show_path, headers: { 'X-Key-Inflection' => 'camel' }
149149
end
150-
expect(response).to have_http_status(:bad_gateway)
150+
expect(response).to have_http_status(:service_unavailable)
151151
end
152152
end
153153
end

modules/my_health/spec/requests/my_health/v2/imaging_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
VCR.use_cassette('unified_health_data/get_imaging_studies_200', match_requests_on: %i[method path]) do
6969
get path, headers: { 'X-Key-Inflection' => 'camel' }, params: default_params
7070
end
71-
expect(response).to have_http_status(:bad_gateway)
71+
expect(response).to have_http_status(:service_unavailable)
7272
end
7373
end
7474
end
@@ -124,7 +124,7 @@
124124
VCR.use_cassette('unified_health_data/get_imaging_study_200', match_requests_on: %i[method path]) do
125125
get thumbnails_path, headers: { 'X-Key-Inflection' => 'camel' }
126126
end
127-
expect(response).to have_http_status(:bad_gateway)
127+
expect(response).to have_http_status(:service_unavailable)
128128
end
129129
end
130130
end
@@ -172,7 +172,7 @@
172172
VCR.use_cassette('unified_health_data/get_dicom_zip_200', match_requests_on: %i[method path]) do
173173
get dicom_path, headers: { 'X-Key-Inflection' => 'camel' }
174174
end
175-
expect(response).to have_http_status(:bad_gateway)
175+
expect(response).to have_http_status(:service_unavailable)
176176
end
177177
end
178178
end

modules/my_health/spec/requests/my_health/v2/vitals_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
get '/my_health/v2/medical_records/vitals',
9292
headers: { 'X-Key-Inflection' => 'camel' }
9393
end
94-
expect(response).to have_http_status(:bad_gateway)
94+
expect(response).to have_http_status(:service_unavailable)
9595
end
9696
end
9797
end

0 commit comments

Comments
 (0)