1
0
Fork 0
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:
Carlos Antonio da Silva 2013-01-22 23:17:17 -02:00
parent 349aab72f0
commit 86eecc6606
13 changed files with 25 additions and 25 deletions

View file

@ -1,6 +1,6 @@
require 'test_helper' require 'test_helper'
class DeviseHelperTest < ActionController::IntegrationTest class DeviseHelperTest < ActionDispatch::IntegrationTest
setup do setup do
model_labels = { :models => { :user => "utilisateur" } } model_labels = { :models => { :user => "utilisateur" } }

View file

@ -1,6 +1,6 @@
require 'test_helper' require 'test_helper'
class AuthenticationSanityTest < ActionController::IntegrationTest class AuthenticationSanityTest < ActionDispatch::IntegrationTest
test 'home should be accessible without sign in' do test 'home should be accessible without sign in' do
visit '/' visit '/'
assert_response :success assert_response :success
@ -134,7 +134,7 @@ class AuthenticationSanityTest < ActionController::IntegrationTest
end end
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 test 'not signed in should not be able to access private route (authenticate denied)' do
get private_path get private_path
assert_redirected_to new_admin_session_path assert_redirected_to new_admin_session_path
@ -254,7 +254,7 @@ class AuthenticationRoutesRestrictions < ActionController::IntegrationTest
end end
end end
class AuthenticationRedirectTest < ActionController::IntegrationTest class AuthenticationRedirectTest < ActionDispatch::IntegrationTest
test 'redirect from warden shows sign in or sign up message' do test 'redirect from warden shows sign in or sign up message' do
get admins_path get admins_path
@ -317,7 +317,7 @@ class AuthenticationRedirectTest < ActionController::IntegrationTest
end end
end end
class AuthenticationSessionTest < ActionController::IntegrationTest class AuthenticationSessionTest < ActionDispatch::IntegrationTest
test 'destroyed account is signed out' do test 'destroyed account is signed out' do
sign_in_as_user sign_in_as_user
get '/users' get '/users'
@ -364,7 +364,7 @@ class AuthenticationSessionTest < ActionController::IntegrationTest
end end
end end
class AuthenticationWithScopedViewsTest < ActionController::IntegrationTest class AuthenticationWithScopedViewsTest < ActionDispatch::IntegrationTest
test 'renders the scoped view if turned on and view is available' do test 'renders the scoped view if turned on and view is available' do
swap Devise, :scoped_views => true do swap Devise, :scoped_views => true do
assert_raise Webrat::NotFoundError do assert_raise Webrat::NotFoundError do
@ -405,7 +405,7 @@ class AuthenticationWithScopedViewsTest < ActionController::IntegrationTest
end end
end end
class AuthenticationOthersTest < ActionController::IntegrationTest class AuthenticationOthersTest < ActionDispatch::IntegrationTest
test 'handles unverified requests gets rid of caches' do test 'handles unverified requests gets rid of caches' do
swap UsersController, :allow_forgery_protection => true do swap UsersController, :allow_forgery_protection => true do
post exhibit_user_url(1) post exhibit_user_url(1)
@ -519,7 +519,7 @@ class AuthenticationOthersTest < ActionController::IntegrationTest
end end
test 'sign out with non-navigational format via XHR does not redirect' do 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 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 */*. 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 assert_response :no_content
@ -529,7 +529,7 @@ class AuthenticationOthersTest < ActionController::IntegrationTest
# Belt and braces ... Perhaps this test is not necessary? # Belt and braces ... Perhaps this test is not necessary?
test 'sign out with navigational format via XHR does redirect' do 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 sign_in_as_user
xml_http_request :get, destroy_user_session_path, {}, { "HTTP_ACCEPT" => "text/html,*/*" } xml_http_request :get, destroy_user_session_path, {}, { "HTTP_ACCEPT" => "text/html,*/*" }
assert_response :redirect assert_response :redirect
@ -538,7 +538,7 @@ class AuthenticationOthersTest < ActionController::IntegrationTest
end end
end end
class AuthenticationKeysTest < ActionController::IntegrationTest class AuthenticationKeysTest < ActionDispatch::IntegrationTest
test 'missing authentication keys cause authentication to abort' do test 'missing authentication keys cause authentication to abort' do
swap Devise, :authentication_keys => [:subdomain] do swap Devise, :authentication_keys => [:subdomain] do
sign_in_as_user sign_in_as_user
@ -555,7 +555,7 @@ class AuthenticationKeysTest < ActionController::IntegrationTest
end end
end end
class AuthenticationRequestKeysTest < ActionController::IntegrationTest class AuthenticationRequestKeysTest < ActionDispatch::IntegrationTest
test 'request keys are used on authentication' do test 'request keys are used on authentication' do
host! 'foo.bar.baz' host! 'foo.bar.baz'
@ -596,7 +596,7 @@ class AuthenticationRequestKeysTest < ActionController::IntegrationTest
end end
end end
class AuthenticationSignOutViaTest < ActionController::IntegrationTest class AuthenticationSignOutViaTest < ActionDispatch::IntegrationTest
def sign_in!(scope) def sign_in!(scope)
sign_in_as_admin(:visit => send("new_#{scope}_session_path")) sign_in_as_admin(:visit => send("new_#{scope}_session_path"))
assert warden.authenticated?(scope) assert warden.authenticated?(scope)

View file

@ -1,6 +1,6 @@
require 'test_helper' require 'test_helper'
class ConfirmationTest < ActionController::IntegrationTest class ConfirmationTest < ActionDispatch::IntegrationTest
def visit_user_confirmation_with_token(confirmation_token) def visit_user_confirmation_with_token(confirmation_token)
visit user_confirmation_path(:confirmation_token => confirmation_token) visit user_confirmation_path(:confirmation_token => confirmation_token)
@ -226,7 +226,7 @@ class ConfirmationTest < ActionController::IntegrationTest
end end
end end
class ConfirmationOnChangeTest < ActionController::IntegrationTest class ConfirmationOnChangeTest < ActionDispatch::IntegrationTest
def create_second_admin(options={}) def create_second_admin(options={})
@admin = nil @admin = nil
create_admin(options) create_admin(options)

View file

@ -1,6 +1,6 @@
require 'test_helper' 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 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') create_user(:email => 'Foo@Bar.com')

View file

@ -1,6 +1,6 @@
require 'test_helper' require 'test_helper'
class HttpAuthenticationTest < ActionController::IntegrationTest class HttpAuthenticationTest < ActionDispatch::IntegrationTest
test 'handles unverified requests gets rid of caches but continues signed in' do test 'handles unverified requests gets rid of caches but continues signed in' do
swap UsersController, :allow_forgery_protection => true do swap UsersController, :allow_forgery_protection => true do
create_user create_user

View file

@ -1,6 +1,6 @@
require 'test_helper' require 'test_helper'
class LockTest < ActionController::IntegrationTest class LockTest < ActionDispatch::IntegrationTest
def visit_user_unlock_with_token(unlock_token) def visit_user_unlock_with_token(unlock_token)
visit user_unlock_path(:unlock_token => unlock_token) visit user_unlock_path(:unlock_token => unlock_token)

View file

@ -1,7 +1,7 @@
require 'test_helper' require 'test_helper'
class OmniauthableIntegrationTest < ActionController::IntegrationTest class OmniauthableIntegrationTest < ActionDispatch::IntegrationTest
FACEBOOK_INFO = { FACEBOOK_INFO = {
"id" => '12345', "id" => '12345',
"link" => 'http://facebook.com/josevalim', "link" => 'http://facebook.com/josevalim',

View file

@ -1,6 +1,6 @@
require 'test_helper' require 'test_helper'
class PasswordTest < ActionController::IntegrationTest class PasswordTest < ActionDispatch::IntegrationTest
def visit_new_password_path def visit_new_password_path
visit new_user_session_path visit new_user_session_path

View file

@ -1,6 +1,6 @@
require 'test_helper' require 'test_helper'
class RegistrationTest < ActionController::IntegrationTest class RegistrationTest < ActionDispatch::IntegrationTest
test 'a guest admin should be able to sign in successfully' do test 'a guest admin should be able to sign in successfully' do
get new_admin_session_path get new_admin_session_path
@ -292,7 +292,7 @@ class RegistrationTest < ActionController::IntegrationTest
end end
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 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 sign_in_as_admin
get edit_admin_registration_path get edit_admin_registration_path

View file

@ -1,6 +1,6 @@
require 'test_helper' require 'test_helper'
class RememberMeTest < ActionController::IntegrationTest class RememberMeTest < ActionDispatch::IntegrationTest
def create_user_and_remember(add_to_token='') def create_user_and_remember(add_to_token='')
user = create_user user = create_user
user.remember_me! user.remember_me!

View file

@ -1,6 +1,6 @@
require 'test_helper' require 'test_helper'
class SessionTimeoutTest < ActionController::IntegrationTest class SessionTimeoutTest < ActionDispatch::IntegrationTest
def last_request_at def last_request_at
@controller.user_session['last_request_at'] @controller.user_session['last_request_at']

View file

@ -1,6 +1,6 @@
require 'test_helper' require 'test_helper'
class TokenAuthenticationTest < ActionController::IntegrationTest class TokenAuthenticationTest < ActionDispatch::IntegrationTest
test 'authenticate with valid authentication token key and value through params' do test 'authenticate with valid authentication token key and value through params' do
swap Devise, :token_authentication_key => :secret_token do swap Devise, :token_authentication_key => :secret_token do

View file

@ -1,6 +1,6 @@
require 'test_helper' 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 test "current and last sign in timestamps are updated on each sign in" do
user = create_user user = create_user