summaryrefslogtreecommitdiff
path: root/test/support
diff options
context:
space:
mode:
Diffstat (limited to 'test/support')
-rw-r--r--test/support/api_integration_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/support/api_integration_test.rb b/test/support/api_integration_test.rb
index 50c528b..aa9c00d 100644
--- a/test/support/api_integration_test.rb
+++ b/test/support/api_integration_test.rb
@@ -6,6 +6,8 @@ class ApiIntegrationTest < ActionDispatch::IntegrationTest
def login(user = nil)
@user ||= user ||= FactoryGirl.create(:user)
@token ||= DUMMY_TOKEN
+ # make sure @token is up to date if it already exists
+ @token.reload if @token.persisted
@token.user_id = @user.id
@token.last_seen_at = Time.now
@token.save