mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Change to always returns html document in error pages (#12214)
This commit is contained in:
parent
6c60ccee8a
commit
afb398b583
@ -136,9 +136,6 @@ class ApplicationController < ActionController::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def respond_with_error(code)
|
def respond_with_error(code)
|
||||||
respond_to do |format|
|
render "errors/#{code}", layout: 'error', status: code
|
||||||
format.any { head code }
|
|
||||||
format.html { render "errors/#{code}", layout: 'error', status: code }
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -22,11 +22,6 @@ describe ApplicationController, type: :controller do
|
|||||||
end
|
end
|
||||||
|
|
||||||
shared_examples 'respond_with_error' do |code|
|
shared_examples 'respond_with_error' do |code|
|
||||||
it "returns http #{code} for any" do
|
|
||||||
subject
|
|
||||||
expect(response).to have_http_status(code)
|
|
||||||
end
|
|
||||||
|
|
||||||
it "returns http #{code} for http" do
|
it "returns http #{code} for http" do
|
||||||
subject
|
subject
|
||||||
expect(response).to have_http_status(code)
|
expect(response).to have_http_status(code)
|
||||||
|
Loading…
Reference in New Issue
Block a user