Use raw status code on have_http_status (#7214)
This commit is contained in:
parent
bfe26ef67b
commit
d10447c3a8
87 changed files with 176 additions and 176 deletions
|
@ -18,13 +18,13 @@ describe MediaController do
|
|||
media_attachment = Fabricate(:media_attachment, status: nil)
|
||||
get :show, params: { id: media_attachment.to_param }
|
||||
|
||||
expect(response).to have_http_status(:missing)
|
||||
expect(response).to have_http_status(404)
|
||||
end
|
||||
|
||||
it 'raises when shortcode cant be found' do
|
||||
get :show, params: { id: 'missing' }
|
||||
|
||||
expect(response).to have_http_status(:missing)
|
||||
expect(response).to have_http_status(404)
|
||||
end
|
||||
|
||||
it 'raises when not permitted to view' do
|
||||
|
@ -33,7 +33,7 @@ describe MediaController do
|
|||
allow_any_instance_of(MediaController).to receive(:authorize).and_raise(ActiveRecord::RecordNotFound)
|
||||
get :show, params: { id: media_attachment.to_param }
|
||||
|
||||
expect(response).to have_http_status(:missing)
|
||||
expect(response).to have_http_status(404)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue