summaryrefslogtreecommitdiff
path: root/test/support/api_integration_test.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-05-15 11:17:47 +0200
committerAzul <azul@leap.se>2014-05-19 14:24:47 +0200
commit71dcf3f4e5d423b78b47f675297fc98b28ef3442 (patch)
tree7415f1f5825abf2d21b2232ccd1ff820f1f513d2 /test/support/api_integration_test.rb
parent5dd6c1529f8f4fc5089c71b0a44e360acaea900d (diff)
SmtpCertsController, routes and tests
Diffstat (limited to 'test/support/api_integration_test.rb')
-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