From 2f7d085c5747a1a68afc0d854fa087ffbb46f8e7 Mon Sep 17 00:00:00 2001 From: ankonym Date: Wed, 2 Sep 2015 17:01:16 +0200 Subject: Fix the remaining failures/errors in our tests Handing freshly generated invite codes to Factory Girl to make the tests pass --- test/support/browser_integration_test.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/support/browser_integration_test.rb') diff --git a/test/support/browser_integration_test.rb b/test/support/browser_integration_test.rb index f20421d..34ec9a6 100644 --- a/test/support/browser_integration_test.rb +++ b/test/support/browser_integration_test.rb @@ -37,7 +37,8 @@ class BrowserIntegrationTest < ActionDispatch::IntegrationTest setup do Capybara.current_driver = Capybara.javascript_driver page.driver.add_headers 'ACCEPT-LANGUAGE' => 'en-EN' - @invite_code = InviteCode.create(invite_code: "testcode") + @testcode = InviteCode.new + @testcode.save! end teardown do @@ -51,7 +52,7 @@ class BrowserIntegrationTest < ActionDispatch::IntegrationTest visit '/users/new' fill_in 'Username', with: username fill_in 'Password', with: password - fill_in 'Invite code', with: "testcode" + fill_in 'Invite code', with: @testcode.invite_code fill_in 'Password confirmation', with: password click_on 'Sign Up' return username, password -- cgit v1.2.3