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