Set expectations for flash inside admin geozones spec

This commit is contained in:
Alberto Miedes Garcés
2016-12-13 13:25:38 +01:00
parent c2006526c9
commit 419905fb59

View File

@@ -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