From 8b5665b857edc460ef6105c3ba0f106dd99a25d5 Mon Sep 17 00:00:00 2001 From: ankonym Date: Thu, 13 Aug 2015 17:24:31 +0200 Subject: Fix test based on actual invite code validation --- engines/support/test/unit/account_extension_test.rb | 4 ++++ engines/support/test/unit/ticket_test.rb | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'engines/support') diff --git a/engines/support/test/unit/account_extension_test.rb b/engines/support/test/unit/account_extension_test.rb index aba162c..dd7e77d 100644 --- a/engines/support/test/unit/account_extension_test.rb +++ b/engines/support/test/unit/account_extension_test.rb @@ -2,6 +2,10 @@ require 'test_helper' class AccountExtensionTest < ActiveSupport::TestCase + setup do + InviteCodeValidator.any_instance.stubs(:not_existent?).returns(false) + end + test "destroying an account triggers ticket destruction" do t = FactoryGirl.create :ticket_with_creator u = t.created_by_user diff --git a/engines/support/test/unit/ticket_test.rb b/engines/support/test/unit/ticket_test.rb index c64e8f4..7727650 100644 --- a/engines/support/test/unit/ticket_test.rb +++ b/engines/support/test/unit/ticket_test.rb @@ -2,6 +2,10 @@ require 'test_helper' class TicketTest < ActiveSupport::TestCase + setup do + InviteCodeValidator.any_instance.stubs(:not_existent?).returns(false) + end + test "ticket with default attribs is valid" do t = FactoryGirl.build :ticket assert t.valid? -- cgit v1.2.3