summaryrefslogtreecommitdiff
path: root/test/support
diff options
context:
space:
mode:
Diffstat (limited to 'test/support')
-rw-r--r--test/support/browser_integration_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/support/browser_integration_test.rb b/test/support/browser_integration_test.rb
index 836eb63..dbd56a9 100644
--- a/test/support/browser_integration_test.rb
+++ b/test/support/browser_integration_test.rb
@@ -55,7 +55,7 @@ class BrowserIntegrationTest < ActionDispatch::IntegrationTest
# currently this only works for tests with poltergeist.
def login(user = nil)
- user ||= @user ||= FactoryGirl.create(:user)
+ @user ||= user ||= FactoryGirl.create(:user)
token = Token.create user_id: user.id
page.driver.add_header "Authorization",
'Token token="' + token.to_s + '"'