diff options
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/secure_token_test.rb | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/activerecord/test/cases/secure_token_test.rb b/activerecord/test/cases/secure_token_test.rb index dc12b528dc..3f7455d12d 100644 --- a/activerecord/test/cases/secure_token_test.rb +++ b/activerecord/test/cases/secure_token_test.rb @@ -22,18 +22,4 @@ class SecureTokenTest < ActiveRecord::TestCase assert_not_equal @user.token, old_token assert_not_equal @user.auth_token, old_auth_token end - - def test_raise_after_ten_unsuccessful_attempts_to_generate_a_unique_token - User.stubs(:exists?).returns(*Array.new(10, true)) - assert_raises(RuntimeError) do - @user.save - end - end - - def test_return_unique_token_after_nine_unsuccessful_attempts - User.stubs(:exists?).returns(*Array.new(10) { |i| i == 9 ? false : true }) - @user.save - assert_not_nil @user.token - assert_not_nil @user.auth_token - end end |