mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-02-27 14:29:39 +00:00
check payment and rewards do not happen on failure
This commit is contained in:
parent
3792073e7d
commit
a32473ef10
@ -7,6 +7,8 @@ shared_examples 'failure response' do |message_key|
|
||||
it 'has status 200' do expect(response).to have_http_status(200) end
|
||||
it 'has an error message' do expect(body['messages']).to include(I18n.t(message_key)) end
|
||||
it 'is not successful' do expect(body['success']).to eq false end
|
||||
it 'does not create a payment' do DiscourseDonations::Stripe.expects(:new).never end
|
||||
it 'does not create rewards' do DiscourseDonations::Rewards.expects(:new).never end
|
||||
end
|
||||
|
||||
module DiscourseDonations
|
||||
|
Loading…
x
Reference in New Issue
Block a user