Revision b299f9c9
Added by Dominic Cleal about 8 years ago
test/functional/hosts_controller_test.rb | ||
---|---|---|
assert_response :not_found
|
||
end
|
||
|
||
test '#interfaces applies compute profile and returns interfaces partial' do
|
||
modifier = mock('InterfaceMerge')
|
||
InterfaceMerge.expects(:new).with().returns(modifier)
|
||
Host::Managed.any_instance.expects(:apply_compute_profile).with(modifier)
|
||
xhr :get, :interfaces, { :host => {:compute_resource_id => compute_resources(:one).id, :compute_profile_id => compute_profiles(:one).id}}, set_session_user
|
||
assert_response :success
|
||
assert_template :partial => '_interfaces'
|
||
end
|
||
|
||
private
|
||
|
||
def initialize_host
|
Also available in: Unified diff
fixes #13980 - don't merge NIC compute attrs on New Host form
Removes merging of NIC's compute attributes when refreshing interfaces
on compute profile or resource selections on the New Host form. Instead,
overwrite NIC attributes from the profile (as it did before 85e82d0) as
the UI needs refreshing completely on compute profile selection.
Merging of NIC compute attributes with the compute profile is retained
on the host API where it's still valuable for supplying a partial set
of compute attributes.