mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Change "ActionController::IntegrationTest" to "ActionDispatch::IntegrationTest"
This commit is contained in:
parent
349aab72f0
commit
86eecc6606
13 changed files with 25 additions and 25 deletions
|
@ -1,6 +1,6 @@
|
|||
require 'test_helper'
|
||||
|
||||
class DeviseHelperTest < ActionController::IntegrationTest
|
||||
class DeviseHelperTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
model_labels = { :models => { :user => "utilisateur" } }
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
|
||||
class OmniauthableIntegrationTest < ActionController::IntegrationTest
|
||||
class OmniauthableIntegrationTest < ActionDispatch::IntegrationTest
|
||||
FACEBOOK_INFO = {
|
||||
"id" => '12345',
|
||||
"link" => 'http://facebook.com/josevalim',
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -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']
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue