Set expectations for flash inside admin geozones spec
This commit is contained in:
@@ -78,6 +78,7 @@ feature 'Admin geozones' do
|
||||
|
||||
within("#geozone_#{geozone.id}") { click_link 'Delete' }
|
||||
|
||||
expect(page).to have_content 'Geozone successfully deleted'
|
||||
expect(page).not_to have_content('Delete me!')
|
||||
expect(Geozone.where(id: geozone.id)).to be_empty
|
||||
end
|
||||
@@ -90,6 +91,8 @@ feature 'Admin geozones' do
|
||||
|
||||
within("#geozone_#{geozone.id}") { click_link 'Delete' }
|
||||
|
||||
expect(page).to have_content "This geozone can't be deleted since there are elements attached to it"
|
||||
|
||||
within("#geozone_#{geozone.id}") do
|
||||
expect(page).to have_content 'Delete me!'
|
||||
end
|
||||
@@ -103,6 +106,8 @@ feature 'Admin geozones' do
|
||||
|
||||
within("#geozone_#{geozone.id}") { click_link 'Delete' }
|
||||
|
||||
expect(page).to have_content "This geozone can't be deleted since there are elements attached to it"
|
||||
|
||||
within("#geozone_#{geozone.id}") do
|
||||
expect(page).to have_content 'Delete me!'
|
||||
end
|
||||
@@ -116,6 +121,8 @@ feature 'Admin geozones' do
|
||||
|
||||
within("#geozone_#{geozone.id}") { click_link 'Delete' }
|
||||
|
||||
expect(page).to have_content "This geozone can't be deleted since there are elements attached to it"
|
||||
|
||||
within("#geozone_#{geozone.id}") do
|
||||
expect(page).to have_content 'Delete me!'
|
||||
end
|
||||
@@ -129,6 +136,8 @@ feature 'Admin geozones' do
|
||||
|
||||
within("#geozone_#{geozone.id}") { click_link 'Delete' }
|
||||
|
||||
expect(page).to have_content "This geozone can't be deleted since there are elements attached to it"
|
||||
|
||||
within("#geozone_#{geozone.id}") do
|
||||
expect(page).to have_content 'Delete me!'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user