X-Git-Url: https://nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/a9210121343f6bcb52154a2ca3cf2cff234e8857..3492c365cb7f85aed18d9575ea0369a927210c4e:/features/step_definitions/commands.rb diff --git a/features/step_definitions/commands.rb b/features/step_definitions/commands.rb index e0b5ea4..622a44b 100644 --- a/features/step_definitions/commands.rb +++ b/features/step_definitions/commands.rb @@ -51,6 +51,12 @@ When /^j'exécute send\-member\-emails\-to\-advisors$/ do NosOignons.send_member_emails_to_advisors! end +When /^j'exécute `create\-membership\-fee\-receipt ([0-9]+) ([0-9,]+)` le ([0-9]{4})-([0-9]{2})-([0-9]{2})$/ do |member, amount, year, month, day| + Timecop.travel(Date.new(year.to_i, month.to_i, day.to_i)) do + NosOignons.create_membership_fee_receipt!(member, amount) + end +end + When /^j'exécute `(create\-membership\-fee\-receipt.*)`$/ do |cmd| run_simple cmd, :fail_on_error => false end