diff options
author | ankonym <ankonym@gmail.com> | 2015-09-02 17:01:16 +0200 |
---|---|---|
committer | ankonym <ankonym@gmail.com> | 2015-09-28 15:12:45 +0200 |
commit | 2f7d085c5747a1a68afc0d854fa087ffbb46f8e7 (patch) | |
tree | 770ca0a89192623372eb1cf24ae885a786fc4bfe /engines/support/test | |
parent | b3762da8d8a06e164524a20d26293a8d5a9770d8 (diff) |
Fix the remaining failures/errors in our tests
Handing freshly generated invite codes to Factory Girl to make the tests pass
Diffstat (limited to 'engines/support/test')
-rw-r--r-- | engines/support/test/integration/create_ticket_test.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/support/test/integration/create_ticket_test.rb b/engines/support/test/integration/create_ticket_test.rb index 90e9a8a..00f9a6b 100644 --- a/engines/support/test/integration/create_ticket_test.rb +++ b/engines/support/test/integration/create_ticket_test.rb @@ -2,6 +2,11 @@ require 'test_helper' class CreateTicketTest < BrowserIntegrationTest + setup do + @testcode = InviteCode.new + @testcode.save! + end + test "can submit ticket anonymously" do visit '/' click_on 'Get Help' @@ -29,7 +34,7 @@ class CreateTicketTest < BrowserIntegrationTest end test "prefills fields" do - login FactoryGirl.create(:premium_user) + login FactoryGirl.create(:premium_user, :invite_code => @testcode.invite_code) visit '/' click_on "Support Tickets" click_on "New Ticket" @@ -48,7 +53,7 @@ class CreateTicketTest < BrowserIntegrationTest end test "cleared email field should remain clear" do - login FactoryGirl.create(:premium_user) + login FactoryGirl.create(:premium_user, :invite_code => @testcode.invite_code) visit '/' click_on "Support Tickets" click_on "New Ticket" |