diff --git a/spec/features/admin/geozones_spec.rb b/spec/features/admin/geozones_spec.rb index 6c4a1c468..cb0392663 100644 --- a/spec/features/admin/geozones_spec.rb +++ b/spec/features/admin/geozones_spec.rb @@ -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