Revision f4459c11
Added by David Davis about 8 years ago
test/unit/ensure_not_used_by_test.rb | ||
---|---|---|
hostgroup = FactoryGirl.create(:hostgroup, :organizations => [@org1, @org2])
|
||
FactoryGirl.create(:host, :hostgroup => hostgroup, :organization => @org2)
|
||
|
||
as_user FactoryGirl.create(:user, :with_mail) do
|
||
as_user FactoryGirl.create(:user, :with_mail) do
|
||
in_taxonomy @org1 do
|
||
refute hostgroup.destroy
|
||
assert_equal "#{hostgroup.name} is being used by a hidden Host::Managed resource", hostgroup.errors.full_messages.first
|
Also available in: Unified diff
Refs #3809 - Turning on some rubocop cops