Fix tests for skylight

This commit is contained in:
Paul Chavard 2020-01-09 10:29:29 +01:00 committed by Pierre de La Morinerie
parent 0a928b2d6b
commit f7c59cffc0
2 changed files with 10 additions and 0 deletions

View file

@ -4,6 +4,7 @@ describe Manager::ApplicationController, type: :controller do
let(:payload) { {} }
before do
allow(@controller).to receive(:content_type).and_return('')
allow(@controller).to receive(:current_user).and_return(current_user)
@controller.send(:append_info_to_payload, payload)
end
@ -13,6 +14,8 @@ describe Manager::ApplicationController, type: :controller do
payload.delete(key)
end
expect(payload).to eq({
sk_rendered_format: nil,
sk_variant: [],
user_agent: 'Rails Testing',
user_id: current_user.id,
user_email: current_user.email