1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Route tests.

This commit is contained in:
Carlos A. da Silva 2009-10-10 09:41:16 -03:00
parent 23bb351d0e
commit 7557ed147a
3 changed files with 50 additions and 10 deletions

View file

@ -2,15 +2,15 @@ require 'test_helper'
class ConfirmationRoutingTest < ActionController::TestCase
test 'new session route' do
test 'new user session route' do
assert_recognizes({:controller => 'confirmations', :action => 'new'}, 'users/confirmation/new')
end
test 'create confirmation route' do
test 'create user confirmation route' do
assert_recognizes({:controller => 'confirmations', :action => 'create'}, {:path => 'users/confirmation', :method => :post})
end
test 'show confirmation route' do
test 'show user confirmation route' do
assert_recognizes({:controller => 'confirmations', :action => 'show'}, 'users/confirmation')
end
@ -19,4 +19,16 @@ class ConfirmationRoutingTest < ActionController::TestCase
assert_recognizes({:controller => 'confirmations', :action => 'new'}, 'users/confirmacao/new')
end
end
test 'new account session route' do
assert_recognizes({:controller => 'confirmations', :action => 'new'}, 'conta/confirmation/new')
end
test 'create account confirmation route' do
assert_recognizes({:controller => 'confirmations', :action => 'create'}, {:path => 'conta/confirmation', :method => :post})
end
test 'show account confirmation route' do
assert_recognizes({:controller => 'confirmations', :action => 'show'}, 'conta/confirmation')
end
end

View file

@ -2,19 +2,19 @@ require 'test_helper'
class PasswordRoutingTest < ActionController::TestCase
test 'new password route' do
test 'new user password route' do
assert_recognizes({:controller => 'passwords', :action => 'new'}, 'users/password/new')
end
test 'create password route' do
test 'create user password route' do
assert_recognizes({:controller => 'passwords', :action => 'create'}, {:path => 'users/password', :method => :post})
end
test 'edit password route' do
test 'edit user password route' do
assert_recognizes({:controller => 'passwords', :action => 'edit'}, 'users/password/edit')
end
test 'update password route' do
test 'update user password route' do
assert_recognizes({:controller => 'passwords', :action => 'update'}, {:path => 'users/password', :method => :put})
end
@ -23,4 +23,20 @@ class PasswordRoutingTest < ActionController::TestCase
assert_recognizes({:controller => 'passwords', :action => 'new'}, 'users/senha/new')
end
end
test 'new account password route' do
assert_recognizes({:controller => 'passwords', :action => 'new'}, 'conta/password/new')
end
test 'create account password route' do
assert_recognizes({:controller => 'passwords', :action => 'create'}, {:path => 'conta/password', :method => :post})
end
test 'edit account password route' do
assert_recognizes({:controller => 'passwords', :action => 'edit'}, 'conta/password/edit')
end
test 'update account password route' do
assert_recognizes({:controller => 'passwords', :action => 'update'}, {:path => 'conta/password', :method => :put})
end
end

View file

@ -2,15 +2,15 @@ require 'test_helper'
class SessionRoutingTest < ActionController::TestCase
test 'new session route' do
test 'new user session route' do
assert_recognizes({:controller => 'sessions', :action => 'new'}, 'users/session/new')
end
test 'create session route' do
test 'create user session route' do
assert_recognizes({:controller => 'sessions', :action => 'create'}, {:path => 'users/session', :method => :post})
end
test 'destroy session route' do
test 'destroy user session route' do
assert_recognizes({:controller => 'sessions', :action => 'destroy'}, {:path => 'users/session', :method => :delete})
end
@ -19,4 +19,16 @@ class SessionRoutingTest < ActionController::TestCase
assert_recognizes({:controller => 'sessions', :action => 'new'}, 'users/sessao/new')
end
end
test 'new account session route' do
assert_recognizes({:controller => 'sessions', :action => 'new'}, 'conta/session/new')
end
test 'create account session route' do
assert_recognizes({:controller => 'sessions', :action => 'create'}, {:path => 'conta/session', :method => :post})
end
test 'destroy account session route' do
assert_recognizes({:controller => 'sessions', :action => 'destroy'}, {:path => 'conta/session', :method => :delete})
end
end