Revision 11617115
Added by Ori Rabin over 7 years ago
test/controllers/hosts_controller_test.rb | ||
---|---|---|
assert_match(/host must have/, flash[:error])
|
||
end
|
||
|
||
test "should create matcher for host turning into managed" do
|
||
original_host = Host::Base.create(:name => 'test', :domain => FactoryGirl.create(:domain))
|
||
lookup_key = FactoryGirl.create(:lookup_key)
|
||
host = original_host.becomes(::Host::Managed)
|
||
host.type = 'Host::Managed'
|
||
host.managed = true
|
||
host.primary_interface.managed = true
|
||
host.lookup_values.build({"match"=>"fqdn=#{host.fqdn}", "value"=>'4', "lookup_key_id" => lookup_key.id, "host_or_hostgroup" => host})
|
||
assert_valid host.lookup_values.first
|
||
end
|
||
|
||
describe '#ipmi_boot' do
|
||
setup do
|
||
@request.env['HTTP_REFERER'] = host_path(@host.id)
|
Also available in: Unified diff
Fixes #14951 - Allow matcher for host turning into managed host