diff --git a/test/controllers/bubbles/pops_controller_test.rb b/test/controllers/bubbles/pops_controller_test.rb index 7628b43ef..2b480f23b 100644 --- a/test/controllers/bubbles/pops_controller_test.rb +++ b/test/controllers/bubbles/pops_controller_test.rb @@ -2,7 +2,7 @@ require "test_helper" class Bubbles::PopsControllerTest < ActionDispatch::IntegrationTest setup do - sign_in :kevin + sign_in_as :kevin end test "create" do diff --git a/test/controllers/buckets_controller_test.rb b/test/controllers/buckets_controller_test.rb index d7c152a19..bdc8c6ac2 100644 --- a/test/controllers/buckets_controller_test.rb +++ b/test/controllers/buckets_controller_test.rb @@ -2,7 +2,7 @@ require "test_helper" class BucketsControllerTest < ActionDispatch::IntegrationTest setup do - sign_in :kevin + sign_in_as :kevin end test "edit" do diff --git a/test/controllers/sessions_controller_test.rb b/test/controllers/sessions_controller_test.rb index 444030a3a..79369690e 100644 --- a/test/controllers/sessions_controller_test.rb +++ b/test/controllers/sessions_controller_test.rb @@ -30,7 +30,7 @@ class SessionsControllerTest < ActionDispatch::IntegrationTest end test "destroy" do - sign_in :kevin + sign_in_as :kevin delete session_url assert_redirected_to new_session_url assert_not cookies[:session_token].present? diff --git a/test/test_helpers/session_test_helper.rb b/test/test_helpers/session_test_helper.rb index 15e98587b..598afbd80 100644 --- a/test/test_helpers/session_test_helper.rb +++ b/test/test_helpers/session_test_helper.rb @@ -3,7 +3,7 @@ module SessionTestHelper ActionDispatch::Cookies::CookieJar.build(request, cookies.to_hash) end - def sign_in(user) + def sign_in_as(user) user = users(user) unless user.is_a? User post session_url, params: { email_address: user.email_address, password: "secret123456" } assert cookies[:session_token].present?