diff --git a/test/models/rememberable_test.rb b/test/models/rememberable_test.rb index ab776ffb..4607e6d5 100644 --- a/test/models/rememberable_test.rb +++ b/test/models/rememberable_test.rb @@ -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!