diff --git a/spec/features/proposal_notifications_spec.rb b/spec/features/proposal_notifications_spec.rb index 33b6bfac1..d2a25c1f6 100644 --- a/spec/features/proposal_notifications_spec.rb +++ b/spec/features/proposal_notifications_spec.rb @@ -420,17 +420,15 @@ describe "Proposal Notifications" do expect(page).to have_content "Your message has been sent correctly." - travel 3.days + 1.second + travel(3.days + 1.second) do + visit new_proposal_notification_path(proposal_id: proposal.id) + fill_in "Title", with: "Thank you again for supporting my proposal" + fill_in "Message", with: "Please share it again with others so we can make it happen!" + click_button "Send message" - visit new_proposal_notification_path(proposal_id: proposal.id) - fill_in "Title", with: "Thank you again for supporting my proposal" - fill_in "Message", with: "Please share it again with others so we can make it happen!" - click_button "Send message" - - expect(page).to have_content "Your message has been sent correctly." - expect(page).not_to have_content "You have to wait a minimum of 3 days between notifications" - - travel_back + expect(page).to have_content "Your message has been sent correctly." + expect(page).not_to have_content "You have to wait a minimum of 3 days between notifications" + end end end end