test(shared_user_context): move to ActionDistpach
From ActionController::TestResponse, to use the new IntegrationTest from rails 5.
This commit is contained in:
parent
11d72b97d5
commit
c3c1311e2f
1 changed files with 2 additions and 2 deletions
|
@ -93,7 +93,7 @@ RSpec.shared_context :shared_user_context do
|
||||||
sign_in user_to_signin if user_to_signin
|
sign_in user_to_signin if user_to_signin
|
||||||
# allows us to run the helpers but ignore what the controller action does
|
# 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)
|
expect_any_instance_of(described_class).to receive(:render).and_return(nil)
|
||||||
send(method, action, *args)
|
send(method, action, *args)
|
||||||
expect(response.status).to eq 200
|
expect(response.status).to eq 200
|
||||||
|
@ -596,4 +596,4 @@ RSpec.shared_context :open_to_profile_owner do |method, action, *args|
|
||||||
it 'accepts profile user' do
|
it 'accepts profile user' do
|
||||||
accept(user_with_profile, method, action, *fixed_args)
|
accept(user_with_profile, method, action, *fixed_args)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue