spec: fix application_controller_spec
Rails controllers now looks for `media_type` rather than `content_type`.
This commit is contained in:
parent
0a3b4f7476
commit
04a6862fa6
2 changed files with 6 additions and 6 deletions
|
@ -19,7 +19,7 @@ describe ApplicationController, type: :controller do
|
|||
let(:payload) { {} }
|
||||
|
||||
before do
|
||||
allow(@controller).to receive(:content_type).and_return('')
|
||||
allow(@controller).to receive(:media_type).and_return('text/plain')
|
||||
allow(@controller).to receive(:current_user).and_return(current_user)
|
||||
expect(@controller).to receive(:current_instructeur).and_return(current_instructeur)
|
||||
expect(@controller).to receive(:current_administrateur).and_return(current_administrateur)
|
||||
|
@ -41,7 +41,7 @@ describe ApplicationController, type: :controller do
|
|||
payload.delete(key)
|
||||
end
|
||||
expect(payload).to eq({
|
||||
sk_rendered_format: nil,
|
||||
sk_rendered_format: :text,
|
||||
sk_variant: [],
|
||||
user_agent: 'Rails Testing',
|
||||
user_roles: 'Guest'
|
||||
|
@ -62,7 +62,7 @@ describe ApplicationController, type: :controller do
|
|||
payload.delete(key)
|
||||
end
|
||||
expect(payload).to eq({
|
||||
sk_rendered_format: nil,
|
||||
sk_rendered_format: :text,
|
||||
sk_variant: [],
|
||||
user_agent: 'Rails Testing',
|
||||
user_id: current_user.id,
|
||||
|
@ -88,7 +88,7 @@ describe ApplicationController, type: :controller do
|
|||
payload.delete(key)
|
||||
end
|
||||
expect(payload).to eq({
|
||||
sk_rendered_format: nil,
|
||||
sk_rendered_format: :text,
|
||||
sk_variant: [],
|
||||
user_agent: 'Rails Testing',
|
||||
user_id: current_user.id,
|
||||
|
|
|
@ -4,7 +4,7 @@ describe Manager::ApplicationController, type: :controller do
|
|||
let(:payload) { {} }
|
||||
|
||||
before do
|
||||
allow(@controller).to receive(:content_type).and_return('')
|
||||
allow(@controller).to receive(:media_type).and_return('text/plain')
|
||||
allow(@controller).to receive(:current_user).and_return(current_user)
|
||||
@controller.send(:append_info_to_payload, payload)
|
||||
end
|
||||
|
@ -14,7 +14,7 @@ describe Manager::ApplicationController, type: :controller do
|
|||
payload.delete(key)
|
||||
end
|
||||
expect(payload).to eq({
|
||||
sk_rendered_format: nil,
|
||||
sk_rendered_format: :text,
|
||||
sk_variant: [],
|
||||
user_agent: 'Rails Testing',
|
||||
user_id: current_user.id,
|
||||
|
|
Loading…
Reference in a new issue