summaryrefslogtreecommitdiff
path: root/engines/support/test/unit
diff options
context:
space:
mode:
authorankonym <ankonym@gmail.com>2015-08-13 17:24:31 +0200
committerankonym <ankonym@gmail.com>2015-09-28 15:12:45 +0200
commit8b5665b857edc460ef6105c3ba0f106dd99a25d5 (patch)
tree11ce426d18b60965c5128feb13f958f3b2dd0253 /engines/support/test/unit
parent8b9b2a0c3c8457024d99d0794416c59cb245a513 (diff)
Fix test based on actual invite code validation
Diffstat (limited to 'engines/support/test/unit')
-rw-r--r--engines/support/test/unit/account_extension_test.rb4
-rw-r--r--engines/support/test/unit/ticket_test.rb4
2 files changed, 8 insertions, 0 deletions
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?