summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-05-13 10:52:55 +0200
committerAzul <azul@leap.se>2014-05-13 10:52:55 +0200
commit0261e82686ec4fcfc8b633664fadb1dd6d9c8070 (patch)
tree7c8401d59f2bccf5c9e46263e89be26afcea4857 /test
parent86eb9062f1e81302647bf18ce0f5fd981202b68a (diff)
keep empty email field if user removed prefill
We should respect the users choice. We can still get their email from the user id if we really need to.
Diffstat (limited to 'test')
-rw-r--r--test/factories.rb5
-rw-r--r--test/support/browser_integration_test.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/test/factories.rb b/test/factories.rb
index ac9333c..bebda5c 100644
--- a/test/factories.rb
+++ b/test/factories.rb
@@ -22,6 +22,11 @@ FactoryGirl.define do
admin.stubs(:is_admin?).returns(true)
end
end
+
+ factory :premium_user do
+ effective_service_level_code 2
+ end
+
end
factory :token do
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 + '"'