From 419905fb591dbc3a959146c6da06acf4f166c360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Miedes=20Garc=C3=A9s?= Date: Tue, 13 Dec 2016 13:25:38 +0100 Subject: [PATCH] Set expectations for flash inside admin geozones spec --- spec/features/admin/geozones_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) 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