Delete enterprise group

This commit is contained in:
Rohan Mitchell
2013-10-24 15:10:25 +11:00
parent b8457b2b0f
commit 49b36d0670
2 changed files with 13 additions and 0 deletions

View File

@@ -22,3 +22,4 @@
%td= enterprise_group.enterprises.map(&:name).join ', '
%td.actions
= link_to '', main_app.edit_admin_enterprise_group_path(enterprise_group), class: 'edit-enterprise-group icon-edit no-text'
= link_to_delete enterprise_group, no_text: true

View File

@@ -73,6 +73,18 @@ feature %q{
eg.enterprises.should == [e2]
end
scenario "deleting an enterprise group", js: true do
eg = create(:enterprise_group, name: 'EGEGEG')
click_link 'Configuration'
click_link 'Enterprise Groups'
first("a.delete-resource").click
page.should have_no_content 'EGEGEG'
EnterpriseGroup.all.should_not include eg
end
context "as an enterprise user" do
xit "should show me only enterprises I manage when creating a new enterprise group"