test(shared_user_context): move to ActionDistpach

From ActionController::TestResponse, to use the new IntegrationTest from rails 5.
This commit is contained in:
Luis Castro 2019-07-13 10:53:47 +02:00
parent 11d72b97d5
commit c3c1311e2f
No known key found for this signature in database
GPG key ID: 0A8F33D4C4E27639

View file

@ -93,7 +93,7 @@ RSpec.shared_context :shared_user_context do
sign_in user_to_signin if user_to_signin
# allows us to run the helpers but ignore what the controller action does
#
expect_any_instance_of(described_class).to receive(action).and_return(ActionController::TestResponse.new(200))
expect_any_instance_of(described_class).to receive(action).and_return(ActionDispatch::IntegrationTest.new(200))
expect_any_instance_of(described_class).to receive(:render).and_return(nil)
send(method, action, *args)
expect(response.status).to eq 200