diff options
author | elijah <elijah@riseup.net> | 2014-04-04 10:42:15 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-04-04 10:42:15 -0700 |
commit | cb6442c344d6bdaf52c3878b2de2fcf4d85f2648 (patch) | |
tree | 2d429b5d4165f3c386be4068ffaad9ede27f292b /users/test/unit/token_test.rb | |
parent | aeb5d8cf8dc6329906f14bf4595a229e002691c1 (diff) | |
parent | 85aabe832eb3eec10a29054ef5575618686eef33 (diff) |
Merge branch 'bugfix/5382-rescue-token-destruction' into develop
Diffstat (limited to 'users/test/unit/token_test.rb')
-rw-r--r-- | users/test/unit/token_test.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/users/test/unit/token_test.rb b/users/test/unit/token_test.rb index 6c9f209..a3c6cf6 100644 --- a/users/test/unit/token_test.rb +++ b/users/test/unit/token_test.rb @@ -78,6 +78,12 @@ class ClientCertificateTest < ActiveSupport::TestCase end - + test "Token.destroy_all_expired does not interfere with expired.authenticate" do + expired = FactoryGirl.create :token, last_seen_at: 2.hours.ago + with_config auth: {token_expires_after: 60} do + Token.destroy_all_expired + end + assert_nil expired.authenticate + end end |