Project

General

Profile

« Previous | Next » 

Revision e14b5758

Added by Greg Sutcliffe over 9 years ago

Fixes #7733 - Remove hosts.yml fixtures and use FactoryGirl instead

View differences:

test/unit/realm_test.rb
test "should not destroy if it contains hosts" do
disable_orchestration
host = create_a_host
host = FactoryGirl.create(:host, :realm => @realm)
assert host.save
realm = host.realm
......
assert realm.save!
end
def create_a_host
hosts(:one)
end
# test taxonomix methods
test "should get used location ids for host" do
FactoryGirl.create(:host, :realm => @realm,
:location => taxonomies(:location1))
assert_equal [taxonomies(:location1).id], realms(:myrealm).used_location_ids
end

Also available in: Unified diff