summaryrefslogtreecommitdiff
path: root/billing/test/functional/payments_controller_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/functional/payments_controller_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/functional/payments_controller_test.rb')
-rw-r--r--billing/test/functional/payments_controller_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/billing/test/functional/payments_controller_test.rb b/billing/test/functional/payments_controller_test.rb
index 8f3bfe7..055a990 100644
--- a/billing/test/functional/payments_controller_test.rb
+++ b/billing/test/functional/payments_controller_test.rb
@@ -17,7 +17,9 @@ class PaymentsControllerTest < ActionController::TestCase
end
test "payment when authenticated as customer" do
- customer = FactoryGirl.create :customer_with_payment_info
+ user = find_record :user
+ customer = stub_record :customer_with_payment_info, user: user
+ Customer.stubs(:find_by_user_id).with(user.id).returns(customer)
login customer.user
get :new
assert_not_nil assigns(:tr_data)