diff --git a/spec/controllers/vm_cloud_controller_spec.rb b/spec/controllers/vm_cloud_controller_spec.rb index 8ff6c0b1a91..15c14bf934d 100644 --- a/spec/controllers/vm_cloud_controller_spec.rb +++ b/spec/controllers/vm_cloud_controller_spec.rb @@ -179,10 +179,10 @@ post :explorer expect(response.status).to eq(200) expect_any_instance_of(GtlHelper).to receive(:render_gtl).with match_gtl_options( - :model_name => 'ManageIQ::Providers::CloudManager::Vm', + :model_name => 'VmOrTemplate', :selected_records => [vm_openstack_tmd.id], :report_data_additional_options => { - :model => 'ManageIQ::Providers::CloudManager::Vm', + :model => 'VmOrTemplate', :lastaction => 'show_list', } ) diff --git a/spec/controllers/vm_infra_controller_spec.rb b/spec/controllers/vm_infra_controller_spec.rb index 3e0ec8ddd97..8c8175db115 100644 --- a/spec/controllers/vm_infra_controller_spec.rb +++ b/spec/controllers/vm_infra_controller_spec.rb @@ -56,7 +56,7 @@ let(:custom_attr1) do FactoryBot.create( - :custom_attribute, + :ems_custom_attribute, :resource => vm_vmware, :name => 'Proč by si jeden nepokrad', :value => 'jó, v tom je Pepa demokrat' @@ -65,7 +65,7 @@ let(:custom_attr2) do FactoryBot.create( - :custom_attribute, + :ems_custom_attribute, :resource => vm_vmware, :name => nil, :value => 'a šikulovi má být dána šance' @@ -75,7 +75,7 @@ # http://localhost:3000/vm_infra/show/10000000000449 it 'can display VM details for vm with ems_custom_attributes and a null attribute name' do vm_vmware.ems_custom_attributes.push(custom_attr1, custom_attr2) - expect(controller).to receive(:identify_record).and_return(vm_vmware) + expect(controller).to receive(:identify_record).twice.and_return(vm_vmware) get :show, :params => { :id => vm_vmware.id } expect(response).to redirect_to(:action => 'explorer')