mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-18 13:38:24 -04:00
Delete needs confirmations in the specs
This commit is contained in:
@@ -46,7 +46,8 @@ describe "Alternate names", js: true do
|
||||
expect(page).to have_link "Delete",
|
||||
href: alternate_name_path(alternate_eggplant)
|
||||
within('.alternate_names') { click_on "Delete" }
|
||||
expect(page.status_code).to equal 200
|
||||
dismiss_confirm {click_link 'OK'}
|
||||
expect(pending_alt_name.status_code).to equal 200
|
||||
expect(page).not_to have_content alternate_eggplant.name
|
||||
expect(page).to have_content 'Alternate name was successfully deleted'
|
||||
end
|
||||
|
||||
@@ -10,13 +10,17 @@ 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'}
|
||||
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'}
|
||||
expect(page).to have_content "crop was successfully destroyed"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user