spec/features/database_groups_spec.rb in detour-0.0.14 vs spec/features/database_groups_spec.rb in detour-0.0.15

- old
+ new

@@ -60,10 +60,16 @@ context "when unsuccessful" do before do click_button "Create Group" end + it "displays a correct error header" do + within ".modal .panel-heading" do + page.should have_content "Whoops! There were some errors saving your group:" + end + end + it "displays error messages" do page.should have_content "Name can't be blank" end end end @@ -133,11 +139,17 @@ context "when unsuccessful" do before do click_button "Update Group" end + it "displays a correct error header" do + within ".panel-danger .panel-heading" do + page.should have_content "Whoops! There were some errors saving your group:" + end + end + it "displays error messages" do - page.should have_content "Memberships user \"\" could not be found" + page.should have_content "User \"\" could not be found" end end end describe "removing a member from a group" do