Skip to content

Commit

Permalink
remove tests for performing recurring donation transaction (will be i…
Browse files Browse the repository at this point in the history
…ncluded in separate branch)
  • Loading branch information
winsonwan committed Apr 3, 2024
1 parent 5b3eaa5 commit 30c1eb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 41 deletions.
16 changes: 0 additions & 16 deletions features/donations/monthly_donation_user_view.feature

This file was deleted.

27 changes: 2 additions & 25 deletions features/step_definitions/option_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
d = Date.parse(date)
Option.first.update_attributes!(:season_start_month => d.month, :season_start_day => d.day)
end

When /^I fill in all valid options$/ do
opts = {
'venue' => "Test Theater",
Expand All @@ -18,7 +18,7 @@
fill_in "option[#{opt}]", :with => val
end
end

Given /^the (boolean )?setting "(.*)" is "(.*)"$/ do |bool,opt,val|
val = !!(val =~ /true/i) if bool
Option.first.update_attributes!(opt.downcase.gsub(/\s+/, '_') => val)
Expand Down Expand Up @@ -54,26 +54,3 @@
# How to check what option the radio button currently has selected?
radio_button = page.find(:css, '#donation_type_radio')
end

######
# Step defintions for testing the recurring donation feature user view
######

Given /admin "(.*)" allowed recurring donations/ do |value|
if value == 'has'
value = true
elsif value == 'has not'
value = false
end
Option.first.update_attributes!(:allow_recurring_donations => value)
end
When /I select monthly in the donation frequency radio button/ do
radio_button = page.find(:css, "#donation_frequency_radio")
radio_button.choose("Monthly")
end
Then /there should be a Recurring Donation model instance belonging to "(.*) (.*)"$/ do |first,last|
r = RecurringDonation.first
c = Customer.find(r.customer_id)
expect(c.first_name).to eq(first)
expect(c.last_name).to eq(last)
end

0 comments on commit 30c1eb6

Please sign in to comment.