Updated

features/step_definitions / debate_scheduled_steps.rb

A
23 lines of codes
0 methods
N/A complexity/method
7 churn
28.14 complexity
0 duplications
Then(/^the petition creator should have been emailed about the scheduled debate$/) do @petition.reload steps %Q( Then "#{@petition.creator.email}" should receive an email When they open the email Then they should see "Parliament is going to debate your petition" in the email body When they click the second link in the email Then I should be on the petition page for "#{@petition.action}" ) end Then(/^all the signatories of the petition should have been emailed about the scheduled debate$/) do @petition.reload @petition.signatures.validated.subscribed.where.not(id: @petition.creator.id).each do |signatory| steps %Q( Then "#{signatory.email}" should receive an email When they open the email Then they should see "Parliament is going to debate the petition" in the email body When they click the second link in the email Then I should be on the petition page for "#{@petition.action}" ) end end