Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added test #18

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions features/donations/monthly_donation_user_view.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ Background:
Given I am logged in as customer "Tom Foolery"
Given admin "has" allowed recurring donations
And I go to the quick donation page

@stubs_successful_credit_card_payment
Scenario: make donation
Then I should see "frequency"
When I select monthly in the donation frequency radio button
When I fill in "Donation amount" with "15"
And I press "Charge Donation to Credit Card"

@stubs_successful_credit_card_payment
Scenario: make donation
Then I should see "You have paid a total of $15.00 by Credit card"
Then there should be a Recurring Donation model instance belonging to "Tom Foolery"


@stubs_failed_credit_card_payment
Scenario: attempt to make a donation but card payment fails
Then there should not be a Recurring Donation model instance belonging to "Tom Foolery"
3 changes: 3 additions & 0 deletions features/step_definitions/option_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,6 @@
expect(c.first_name).to eq(first)
expect(c.last_name).to eq(last)
end
Then /there should not be a Recurring Donation model instance belonging to "(.*) (.*)"$/ do |first,last|
expect(RecurringDonation.first).to eq(nil)
end
Loading