Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Altmann committed Oct 17, 2016
1 parent d751aea commit 40ca89a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions test/features/users_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@

# Assert 2 requests to Fastbill, one customer.get, one customer.update (both are POST requests)
# User is saved two times, therefore 4 requests
assert_requested :post, 'https://my_email:my_fastbill_api_key@monsum.com'\
assert_requested :post, 'https://my_email:my_fastbill_api_key@app.monsum.com'\
'/api/1.0/api.php', times: 4
end

Expand All @@ -331,7 +331,7 @@

refute @user.reload.has_active_direct_debit_mandate?
# Assert 2 requests to Fastbill, one customer.get, one customer.update (both are POST requests)
assert_requested :post, 'https://my_email:my_fastbill_api_key@monsum.com'\
assert_requested :post, 'https://my_email:my_fastbill_api_key@app.monsum.com'\
'/api/1.0/api.php', times: 2
page.must_have_content I18n.t('devise.registrations.direct_debit_mandate_revoked')
end
Expand Down
8 changes: 4 additions & 4 deletions test/objects/fastbill_api_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
it 'should not contact Fastbill' do
api = FastbillAPI.new bt_from_private_user
api.fastbill_chain
assert_not_requested :post, 'https://my_email:my_fastbill_api_key@monsum.com'\
assert_not_requested :post, 'https://my_email:my_fastbill_api_key@app.monsum.com'\
'/api/1.0/api.php'
end
end
Expand All @@ -32,7 +32,7 @@
it 'should not contact Fastbill' do
api = FastbillAPI.new bt_from_ngo
api.fastbill_chain
assert_not_requested :post, 'https://my_email:my_fastbill_api_key@monsum.com'\
assert_not_requested :post, 'https://my_email:my_fastbill_api_key@app.monsum.com'\
'/api/1.0/api.php'
end
end
Expand All @@ -41,7 +41,7 @@
it 'should not contact Fastbill' do
api = FastbillAPI.new bt_from_marketplace_owner_account
api.fastbill_chain
assert_not_requested :post, 'https://my_email:my_fastbill_api_key@monsum.com'\
assert_not_requested :post, 'https://my_email:my_fastbill_api_key@app.monsum.com'\
'/api/1.0/api.php'
end
end
Expand All @@ -56,7 +56,7 @@
api.expects(:fastbill_create_customer).never
api.expects(:fastbill_create_subscription).never
api.fastbill_chain
assert_requested :post, 'https://my_email:my_fastbill_api_key@monsum.com'\
assert_requested :post, 'https://my_email:my_fastbill_api_key@app.monsum.com'\
'/api/1.0/api.php', times: 2
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class ActiveSupport::TestCase
DatabaseCleaner.start

# Use fake Fastbill service
stub_request(:any, /monsum.com/).to_rack(FakeFastbill)
stub_request(:any, /app.monsum.com/).to_rack(FakeFastbill)
end

after :each do
Expand All @@ -110,7 +110,7 @@ class MiniTest::Spec
DatabaseCleaner.start

# Use fake Fastbill service
stub_request(:any, /monsum.com/).to_rack(FakeFastbill)
stub_request(:any, /app.monsum.com/).to_rack(FakeFastbill)
end

after :each do
Expand Down

0 comments on commit 40ca89a

Please sign in to comment.