mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
27 lines
879 B
Ruby
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
|