diff --git a/test/helpers/devise_helper_test.rb b/test/helpers/devise_helper_test.rb index 61ad1f7b..f37682e2 100644 --- a/test/helpers/devise_helper_test.rb +++ b/test/helpers/devise_helper_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class DeviseHelperTest < ActionController::IntegrationTest +class DeviseHelperTest < ActionDispatch::IntegrationTest setup do model_labels = { :models => { :user => "utilisateur" } } diff --git a/test/integration/authenticatable_test.rb b/test/integration/authenticatable_test.rb index 04c2fa0b..93aeb5f4 100644 --- a/test/integration/authenticatable_test.rb +++ b/test/integration/authenticatable_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class AuthenticationSanityTest < ActionController::IntegrationTest +class AuthenticationSanityTest < ActionDispatch::IntegrationTest test 'home should be accessible without sign in' do visit '/' assert_response :success @@ -134,7 +134,7 @@ class AuthenticationSanityTest < ActionController::IntegrationTest end end -class AuthenticationRoutesRestrictions < ActionController::IntegrationTest +class AuthenticationRoutesRestrictions < ActionDispatch::IntegrationTest test 'not signed in should not be able to access private route (authenticate denied)' do get private_path assert_redirected_to new_admin_session_path @@ -254,7 +254,7 @@ class AuthenticationRoutesRestrictions < ActionController::IntegrationTest end end -class AuthenticationRedirectTest < ActionController::IntegrationTest +class AuthenticationRedirectTest < ActionDispatch::IntegrationTest test 'redirect from warden shows sign in or sign up message' do get admins_path @@ -317,7 +317,7 @@ class AuthenticationRedirectTest < ActionController::IntegrationTest end end -class AuthenticationSessionTest < ActionController::IntegrationTest +class AuthenticationSessionTest < ActionDispatch::IntegrationTest test 'destroyed account is signed out' do sign_in_as_user get '/users' @@ -364,7 +364,7 @@ class AuthenticationSessionTest < ActionController::IntegrationTest end end -class AuthenticationWithScopedViewsTest < ActionController::IntegrationTest +class AuthenticationWithScopedViewsTest < ActionDispatch::IntegrationTest test 'renders the scoped view if turned on and view is available' do swap Devise, :scoped_views => true do assert_raise Webrat::NotFoundError do @@ -405,7 +405,7 @@ class AuthenticationWithScopedViewsTest < ActionController::IntegrationTest end end -class AuthenticationOthersTest < ActionController::IntegrationTest +class AuthenticationOthersTest < ActionDispatch::IntegrationTest test 'handles unverified requests gets rid of caches' do swap UsersController, :allow_forgery_protection => true do post exhibit_user_url(1) @@ -519,7 +519,7 @@ class AuthenticationOthersTest < ActionController::IntegrationTest end test 'sign out with non-navigational format via XHR does not redirect' do - swap Devise, :navigational_formats => ['*/*', :html] do + swap Devise, :navigational_formats => ['*/*', :html] do sign_in_as_user xml_http_request :get, destroy_user_session_path, {}, { "HTTP_ACCEPT" => "application/json,text/javascript,*/*" } # NOTE: Bug is triggered by combination of XHR and */*. assert_response :no_content @@ -529,7 +529,7 @@ class AuthenticationOthersTest < ActionController::IntegrationTest # Belt and braces ... Perhaps this test is not necessary? test 'sign out with navigational format via XHR does redirect' do - swap Devise, :navigational_formats => ['*/*', :html] do + swap Devise, :navigational_formats => ['*/*', :html] do sign_in_as_user xml_http_request :get, destroy_user_session_path, {}, { "HTTP_ACCEPT" => "text/html,*/*" } assert_response :redirect @@ -538,7 +538,7 @@ class AuthenticationOthersTest < ActionController::IntegrationTest end end -class AuthenticationKeysTest < ActionController::IntegrationTest +class AuthenticationKeysTest < ActionDispatch::IntegrationTest test 'missing authentication keys cause authentication to abort' do swap Devise, :authentication_keys => [:subdomain] do sign_in_as_user @@ -555,7 +555,7 @@ class AuthenticationKeysTest < ActionController::IntegrationTest end end -class AuthenticationRequestKeysTest < ActionController::IntegrationTest +class AuthenticationRequestKeysTest < ActionDispatch::IntegrationTest test 'request keys are used on authentication' do host! 'foo.bar.baz' @@ -596,7 +596,7 @@ class AuthenticationRequestKeysTest < ActionController::IntegrationTest end end -class AuthenticationSignOutViaTest < ActionController::IntegrationTest +class AuthenticationSignOutViaTest < ActionDispatch::IntegrationTest def sign_in!(scope) sign_in_as_admin(:visit => send("new_#{scope}_session_path")) assert warden.authenticated?(scope) diff --git a/test/integration/confirmable_test.rb b/test/integration/confirmable_test.rb index c9858572..1e20ec0d 100644 --- a/test/integration/confirmable_test.rb +++ b/test/integration/confirmable_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class ConfirmationTest < ActionController::IntegrationTest +class ConfirmationTest < ActionDispatch::IntegrationTest def visit_user_confirmation_with_token(confirmation_token) visit user_confirmation_path(:confirmation_token => confirmation_token) @@ -226,7 +226,7 @@ class ConfirmationTest < ActionController::IntegrationTest end end -class ConfirmationOnChangeTest < ActionController::IntegrationTest +class ConfirmationOnChangeTest < ActionDispatch::IntegrationTest def create_second_admin(options={}) @admin = nil create_admin(options) diff --git a/test/integration/database_authenticatable_test.rb b/test/integration/database_authenticatable_test.rb index 4bdf10ee..65b7c805 100644 --- a/test/integration/database_authenticatable_test.rb +++ b/test/integration/database_authenticatable_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class DatabaseAuthenticationTest < ActionController::IntegrationTest +class DatabaseAuthenticationTest < ActionDispatch::IntegrationTest test 'sign in with email of different case should succeed when email is in the list of case insensitive keys' do create_user(:email => 'Foo@Bar.com') diff --git a/test/integration/http_authenticatable_test.rb b/test/integration/http_authenticatable_test.rb index 1227c19c..de910190 100644 --- a/test/integration/http_authenticatable_test.rb +++ b/test/integration/http_authenticatable_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class HttpAuthenticationTest < ActionController::IntegrationTest +class HttpAuthenticationTest < ActionDispatch::IntegrationTest test 'handles unverified requests gets rid of caches but continues signed in' do swap UsersController, :allow_forgery_protection => true do create_user diff --git a/test/integration/lockable_test.rb b/test/integration/lockable_test.rb index 50d4b519..1a5d9997 100644 --- a/test/integration/lockable_test.rb +++ b/test/integration/lockable_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class LockTest < ActionController::IntegrationTest +class LockTest < ActionDispatch::IntegrationTest def visit_user_unlock_with_token(unlock_token) visit user_unlock_path(:unlock_token => unlock_token) diff --git a/test/integration/omniauthable_test.rb b/test/integration/omniauthable_test.rb index 2d55ebc6..62698515 100644 --- a/test/integration/omniauthable_test.rb +++ b/test/integration/omniauthable_test.rb @@ -1,7 +1,7 @@ require 'test_helper' -class OmniauthableIntegrationTest < ActionController::IntegrationTest +class OmniauthableIntegrationTest < ActionDispatch::IntegrationTest FACEBOOK_INFO = { "id" => '12345', "link" => 'http://facebook.com/josevalim', diff --git a/test/integration/recoverable_test.rb b/test/integration/recoverable_test.rb index 1524497b..28781e5e 100644 --- a/test/integration/recoverable_test.rb +++ b/test/integration/recoverable_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class PasswordTest < ActionController::IntegrationTest +class PasswordTest < ActionDispatch::IntegrationTest def visit_new_password_path visit new_user_session_path diff --git a/test/integration/registerable_test.rb b/test/integration/registerable_test.rb index c1a9b923..9583097f 100644 --- a/test/integration/registerable_test.rb +++ b/test/integration/registerable_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class RegistrationTest < ActionController::IntegrationTest +class RegistrationTest < ActionDispatch::IntegrationTest test 'a guest admin should be able to sign in successfully' do get new_admin_session_path @@ -292,7 +292,7 @@ class RegistrationTest < ActionController::IntegrationTest end end -class ReconfirmableRegistrationTest < ActionController::IntegrationTest +class ReconfirmableRegistrationTest < ActionDispatch::IntegrationTest test 'a signed in admin should see a more appropriate flash message when editing his account if reconfirmable is enabled' do sign_in_as_admin get edit_admin_registration_path diff --git a/test/integration/rememberable_test.rb b/test/integration/rememberable_test.rb index ea98cab7..69fb202c 100644 --- a/test/integration/rememberable_test.rb +++ b/test/integration/rememberable_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class RememberMeTest < ActionController::IntegrationTest +class RememberMeTest < ActionDispatch::IntegrationTest def create_user_and_remember(add_to_token='') user = create_user user.remember_me! diff --git a/test/integration/timeoutable_test.rb b/test/integration/timeoutable_test.rb index f488d8ef..c5283537 100644 --- a/test/integration/timeoutable_test.rb +++ b/test/integration/timeoutable_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class SessionTimeoutTest < ActionController::IntegrationTest +class SessionTimeoutTest < ActionDispatch::IntegrationTest def last_request_at @controller.user_session['last_request_at'] diff --git a/test/integration/token_authenticatable_test.rb b/test/integration/token_authenticatable_test.rb index 17426dbf..07bf0533 100644 --- a/test/integration/token_authenticatable_test.rb +++ b/test/integration/token_authenticatable_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class TokenAuthenticationTest < ActionController::IntegrationTest +class TokenAuthenticationTest < ActionDispatch::IntegrationTest test 'authenticate with valid authentication token key and value through params' do swap Devise, :token_authentication_key => :secret_token do diff --git a/test/integration/trackable_test.rb b/test/integration/trackable_test.rb index df492784..68cfb93c 100644 --- a/test/integration/trackable_test.rb +++ b/test/integration/trackable_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class TrackableHooksTest < ActionController::IntegrationTest +class TrackableHooksTest < ActionDispatch::IntegrationTest test "current and last sign in timestamps are updated on each sign in" do user = create_user