Required fields on token_authenticatable

This commit is contained in:
Rodrigo Flores
2012-02-17 15:50:15 -02:00
parent 533511f8c3
commit f3bace570d
2 changed files with 14 additions and 0 deletions

View File

@@ -46,4 +46,10 @@ class TokenAuthenticatableTest < ActiveSupport::TestCase
user = User.find_for_token_authentication(:auth_token => {'$ne' => user1.authentication_token})
assert_nil user
end
test 'required_fields should contain the fields that Devise uses' do
assert_equal Devise::Models::TokenAuthenticatable::ModuleMethods.required_fields.sort, [
:authentication_token
]
end
end