correct the test

This commit is contained in:
Sam 2017-02-14 09:34:39 -05:00
parent c52784f9d2
commit 5346cd3514
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ class UserAuthToken < ActiveRecord::Base
if mark_seen && user_token && !user_token.auth_token_seen && user_token.auth_token == token
# we must protect against concurrency issues here
changed_rows = UserAuthToken.where(id: user_token.id, auth_token: token).update_all(auth_token_seen: true)
if changed_rows
if changed_rows == 1
# not doing a reload so we don't risk loading a rotated token
user_token.auth_token_seen = true
end