diff --git a/features/dashboard/group.feature b/features/dashboard/group.feature index cf4b8d7283b3c796fe1099884ec90aae9a290c69..e3c01db2ebb113dc73e509f501f54896ec99639e 100644 --- a/features/dashboard/group.feature +++ b/features/dashboard/group.feature @@ -24,7 +24,8 @@ Feature: Dashboard Group When I visit dashboard groups page Then I should see group "Owned" in group list Then I should see group "Guest" in group list - Then I should not see the "Leave" button for group "Owned" + When I click on the "Leave" button for group "Owned" + Then I should see the "Can not leave message" @javascript Scenario: Guest should be able to leave from group diff --git a/features/steps/dashboard/group.rb b/features/steps/dashboard/group.rb index 8384df2fb59cb15aaaf0dd83d03a80670492645a..aeea49320ffcc7c5c8187569a5c9637eaa24dc1c 100644 --- a/features/steps/dashboard/group.rb +++ b/features/steps/dashboard/group.rb @@ -60,4 +60,8 @@ class Spinach::Features::DashboardGroup < Spinach::FeatureSteps page.should have_content "Samurai" page.should have_content "Tokugawa Shogunate" end + + step 'I should see the "Can not leave message"' do + page.should have_content "You can not leave Owned group because you're the last owner" + end end