Return Symbol in find_scope! if String passed

This commit is contained in:
micat
2014-08-23 22:33:08 +09:00
parent df43642cd5
commit 7b5293906b
3 changed files with 8 additions and 1 deletions

View File

@@ -62,6 +62,7 @@ class MappingTest < ActiveSupport::TestCase
test 'find scope for a given object' do
assert_equal :user, Devise::Mapping.find_scope!(User)
assert_equal :user, Devise::Mapping.find_scope!(:user)
assert_equal :user, Devise::Mapping.find_scope!("user")
assert_equal :user, Devise::Mapping.find_scope!(User.new)
end