summaryrefslogtreecommitdiff
path: root/users/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'users/test/unit')
-rw-r--r--users/test/unit/token_test.rb8
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