1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00
heartcombo--devise/test/routes_test.rb
2009-10-12 21:49:51 -03:00

27 lines
879 B
Ruby

require 'test/test_helper'
class MapRoutingTest < ActionController::TestCase
test 'map devise user session' do
assert_recognizes({:controller => 'sessions', :action => 'new'}, 'users/session/new')
end
test 'map devise user confirmation' do
assert_recognizes({:controller => 'confirmations', :action => 'new'}, 'users/confirmation/new')
end
test 'map devise user password' do
assert_recognizes({:controller => 'passwords', :action => 'new'}, 'users/password/new')
end
test 'map devise admin session with :as option' do
assert_recognizes({:controller => 'sessions', :action => 'new'}, 'admin_area/session/new')
end
test 'does not map devise admin confirmation' do
assert_raise ActionController::RoutingError do
assert_recognizes({:controller => 'confirmations', :action => 'new'}, 'admin_area/confirmation/new')
end
end
end