diff options
author | ankonym <ankonym@gmail.com> | 2015-08-13 17:24:31 +0200 |
---|---|---|
committer | ankonym <ankonym@gmail.com> | 2015-09-28 15:12:45 +0200 |
commit | 8b5665b857edc460ef6105c3ba0f106dd99a25d5 (patch) | |
tree | 11ce426d18b60965c5128feb13f958f3b2dd0253 /engines | |
parent | 8b9b2a0c3c8457024d99d0794416c59cb245a513 (diff) |
Fix test based on actual invite code validation
Diffstat (limited to 'engines')
-rw-r--r-- | engines/billing/test/functional/customers_controller_test.rb | 1 | ||||
-rw-r--r-- | engines/support/test/unit/account_extension_test.rb | 4 | ||||
-rw-r--r-- | engines/support/test/unit/ticket_test.rb | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/engines/billing/test/functional/customers_controller_test.rb b/engines/billing/test/functional/customers_controller_test.rb index cc82fc1..0dafe72 100644 --- a/engines/billing/test/functional/customers_controller_test.rb +++ b/engines/billing/test/functional/customers_controller_test.rb @@ -5,6 +5,7 @@ class CustomersControllerTest < ActionController::TestCase tests CustomerController setup do + InviteCodeValidator.any_instance.stubs(:not_existent?).returns(false) @user = FactoryGirl.create :user @other_user = FactoryGirl.create :user #FakeBraintree.clear! 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? |