Revision f5ab56ae
Added by Dmitri Dolguikh almost 10 years ago
test/functional/hosts_controller_test.rb | ||
---|---|---|
end
|
||
|
||
def test_clone
|
||
ComputeResource.any_instance.stubs(:vm_compute_attributes_for).returns({})
|
||
get :clone, {:id => Host.first.name}, set_session_user
|
||
assert assigns(:clone_host)
|
||
assert_template 'new'
|
||
end
|
||
|
||
def test_clone_empties_fields
|
||
ComputeResource.any_instance.stubs(:vm_compute_attributes_for).returns({})
|
||
get :clone, {:id => Host.first.name}, set_session_user
|
||
refute assigns(:host).name
|
||
refute assigns(:host).ip
|
Also available in: Unified diff
fixes #5722: VM-based host cloning picks up existing compute attributes