X-Git-Url: https://nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/b4bb2e3b6dc1c0edc44598e57f5d9b9d69f6ec24..a0cdfa366e3688112df52d1865ebac2b631776fe:/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