Revision feacea35
Added by Amos Benari about 11 years ago
- ID feacea35f07f362d9e2c694a83516bbc902321a0
test/unit/hostgroup_test.rb | ||
---|---|---|
end
|
||
|
||
test "should inherit parent classes" do
|
||
assert (top = Hostgroup.create(:name => "topA", "puppetclass_ids"=>[Puppetclass.first.id]))
|
||
assert (second = Hostgroup.create(:name => "secondB", :parent_id => top.id, "puppetclass_ids"=>[Puppetclass.last.id]))
|
||
child, top = nil
|
||
as_admin do
|
||
top = Hostgroup.create!(:name => "topA")
|
||
top.puppetclasses << Puppetclass.first
|
||
child = Hostgroup.create!(:name => "secondB", :parent_id => top.id)
|
||
child.puppetclasses << Puppetclass.last
|
||
end
|
||
|
||
assert_equal [Puppetclass.first, Puppetclass.last].sort, second.classes.sort
|
||
assert_equal [Puppetclass.first, Puppetclass.last].sort, child.classes.sort
|
||
end
|
||
|
||
test "should remove relationships if deleting a parent hostgroup" do
|
Also available in: Unified diff
upgrade foreman to rails 3.2.13
This commit updates from rails 3.0.x to 3.2.x, main changes include:
Users who uses foreman in production, make sure that you now compile
your assets, e.g
rake assets:precompile
Paired-with: Joseph Mitchell Magen <jmagen@redhat.com>
Paired-with: Ohad Levy <ohadlevy@gmail.com>
Signed-off-by: Ohad Levy <ohadlevy@gmail.com>