mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Add tests to previous commit.
This commit is contained in:
parent
8e173f486c
commit
f1bbce58f3
4 changed files with 6 additions and 4 deletions
4
Gemfile
4
Gemfile
|
@ -1,9 +1,9 @@
|
|||
source "http://gemcutter.org"
|
||||
|
||||
# Need to install Rails from source
|
||||
gem "rails", "3.0.0.beta3"
|
||||
gem "rails", :path => "../rails"
|
||||
gem "warden", "0.10.3"
|
||||
gem "sqlite3-ruby", :require => "sqlite3"
|
||||
gem "sqlite3-ruby"
|
||||
gem "webrat", "0.7"
|
||||
gem "mocha", :require => false
|
||||
gem "bcrypt-ruby", :require => "bcrypt"
|
||||
|
|
|
@ -72,6 +72,7 @@ module Devise
|
|||
@controllers.merge!(options.delete(:controllers) || {})
|
||||
|
||||
@path_names = Hash.new { |h,k| h[k] = k.to_s }
|
||||
@path_names.merge!(:registration => "")
|
||||
@path_names.merge!(options.delete(:path_names) || {})
|
||||
end
|
||||
|
||||
|
|
|
@ -11,7 +11,8 @@ Rails::Application.routes.draw do
|
|||
:class_name => "User", :path_names => {
|
||||
:sign_in => "login", :sign_out => "logout",
|
||||
:password => "secret", :confirmation => "verification",
|
||||
:unlock => "unblock", :sign_up => "register"
|
||||
:unlock => "unblock", :sign_up => "register",
|
||||
:registration => "management"
|
||||
}
|
||||
|
||||
match "/admin_area/home", :to => "admins#index", :as => :admin_root
|
||||
|
|
|
@ -109,6 +109,6 @@ class MapRoutingTest < ActionController::TestCase
|
|||
end
|
||||
|
||||
test 'map account with custom path name for registration' do
|
||||
assert_recognizes({:controller => 'devise/registrations', :action => 'new', :locale => 'en'}, '/en/accounts/register')
|
||||
assert_recognizes({:controller => 'devise/registrations', :action => 'new', :locale => 'en'}, '/en/accounts/management/register')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue