X-Git-Url: https://nos-oignons.net/gitweb/gestion-adh.git/blobdiff_plain/4a99ae87e0f7fdd07d8820a724fbed1d8b2b5f36..13767cc69697b7eaf4be6e47788efe636b56b6fd:/features/step_definitions/subscriptions.rb?ds=sidebyside diff --git a/features/step_definitions/subscriptions.rb b/features/step_definitions/subscriptions.rb index a4827f5..dd18151 100644 --- a/features/step_definitions/subscriptions.rb +++ b/features/step_definitions/subscriptions.rb @@ -23,6 +23,17 @@ Given /^(?:une base )?avec (\w+)(, à jour de cotisation| qui n'a pas payé sa c write_file file, render_subscription_file(data) end +Given /^une nouvelle adhésion de (\w+)$/ do |name| + data = { 'name' => name, + 'address' => "At #{name}", + 'email' => "#{name.downcase}@example.org", + 'membership_fee_paid_on' => Time.now.strftime('%Y-%m-%d') + } + create_dir 'Membres' + file = subscription_filename_for_id(new_id) + write_file file, render_subscription_file(data) +end + When /^j'ajoute une fiche correcte pour une nouvelle adhésion$/ do @file = subscription_filename_for_id(new_id) write_file @file, render_subscription_file(EXTRA_SUBSCRIPTION)