Ensure namespaces has proper scoped views, closes #654

This commit is contained in:
José Valim
2010-11-20 21:41:26 +01:00
parent 6bfcbeffdd
commit d8016ea3fd
6 changed files with 18 additions and 7 deletions

View File

@@ -12,9 +12,19 @@ class MappingTest < ActiveSupport::TestCase
mapping = Devise.mappings[:user]
assert_equal User, mapping.to
assert_equal User.devise_modules, mapping.modules
assert_equal :users, mapping.plural
assert_equal "users", mapping.scoped_path
assert_equal :user, mapping.singular
assert_equal "users", mapping.path
assert_equal "/users", mapping.fullpath
end
test 'store options with namespace' do
mapping = Devise.mappings[:publisher_account]
assert_equal Admin, mapping.to
assert_equal "publisher/accounts", mapping.scoped_path
assert_equal :publisher_account, mapping.singular
assert_equal "accounts", mapping.path
assert_equal "/publisher/accounts", mapping.fullpath
end
test 'allows path to be given' do