mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Add a test related to remember token generation
This commit is contained in:
parent
72c3472fe1
commit
605924a921
1 changed files with 8 additions and 0 deletions
|
@ -22,6 +22,14 @@ class RememberableTest < ActiveSupport::TestCase
|
|||
user.forget_me!
|
||||
end
|
||||
|
||||
test 'can generate remember token' do
|
||||
user = create_user
|
||||
user.singleton_class.send(:attr_accessor, :remember_token)
|
||||
User.to_adapter.expects(:find_first).returns(nil)
|
||||
user.remember_me!
|
||||
assert user.remember_token
|
||||
end
|
||||
|
||||
test 'serialize into cookie' do
|
||||
user = create_user
|
||||
user.remember_me!
|
||||
|
|
Loading…
Reference in a new issue