summaryrefslogtreecommitdiff
path: root/billing/test/unit/customer_with_payment_info_test.rb
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2013-09-03 10:48:13 -0700
committerjessib <jessib@riseup.net>2013-09-03 10:48:13 -0700
commit07d0f6fe1d80cb730bd12a03a107c18d18779acc (patch)
tree8583a31661ba5032a9cd6ffd6b74273a6c862ab0 /billing/test/unit/customer_with_payment_info_test.rb
parentf3e17149116f6a3aeb87f8a6d0ecf29e8e33ad93 (diff)
parent29b306a4d49d395e5753e2e85f8fa1f25d18410c (diff)
Merge pull request #73 from azul/bugfix/3623-teardown-test-data-properly
Bugfix/3623 teardown test data properly
Diffstat (limited to 'billing/test/unit/customer_with_payment_info_test.rb')
-rw-r--r--billing/test/unit/customer_with_payment_info_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/billing/test/unit/customer_with_payment_info_test.rb b/billing/test/unit/customer_with_payment_info_test.rb
index ca89e65..0589a59 100644
--- a/billing/test/unit/customer_with_payment_info_test.rb
+++ b/billing/test/unit/customer_with_payment_info_test.rb
@@ -2,9 +2,11 @@ require 'test_helper'
require 'fake_braintree'
class CustomerWithPaymentInfoTest < ActiveSupport::TestCase
+ include StubRecordHelper
setup do
- @customer = FactoryGirl.build(:customer_with_payment_info)
+ @user = find_record :user
+ @customer = FactoryGirl.build(:customer_with_payment_info, user: @user)
end
test "has payment_info" do
@@ -28,6 +30,7 @@ class CustomerWithPaymentInfoTest < ActiveSupport::TestCase
assert_equal 'Spender', @customer.last_name
assert_equal 1, @customer.credit_cards.size
assert_equal Hash.new, @customer.custom_fields
+ @customer.destroy
end
test "sets default_credit_card" do