From 4fa4286670187213975f0977602f17d64a2e372b Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Fri, 14 Jun 2019 20:32:12 +1200 Subject: [PATCH] dismiss the alert when deleting crops --- spec/features/crops/delete_crop_spec.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/spec/features/crops/delete_crop_spec.rb b/spec/features/crops/delete_crop_spec.rb index 1bdab7272..b3c108ef9 100644 --- a/spec/features/crops/delete_crop_spec.rb +++ b/spec/features/crops/delete_crop_spec.rb @@ -11,16 +11,18 @@ describe "Delete crop spec" do it "Delete approved crop" do visit crop_path(approved_crop) click_link 'Actions' - click_link 'Delete' - dismiss_confirm {click_link 'OK'} + accept_confirm do + click_link 'Delete' + end expect(page).to have_content "crop was successfully destroyed" end it "Delete pending crop" do visit crop_path(pending_crop) click_link 'Actions' - click_link 'Delete' - dismiss_confirm {click_link 'OK'} + accept_confirm do + click_link 'Delete' + end expect(page).to have_content "crop was successfully destroyed" end end