diff --git a/spec/controllers/ems_infra_controller_spec.rb b/spec/controllers/ems_infra_controller_spec.rb index 42fce8475c6..2b271364ddc 100644 --- a/spec/controllers/ems_infra_controller_spec.rb +++ b/spec/controllers/ems_infra_controller_spec.rb @@ -607,9 +607,15 @@ before do allow(controller).to receive(:check_privileges).and_return(true) allow(controller).to receive(:assert_privileges).and_return(true) - login_as FactoryGirl.create(:user, :features => "ems_infra_new") + ems = FactoryGirl.build(:user, :features => "ems_infra_new") + login_as ems allow_any_instance_of(ManageIQ::Providers::Redhat::InfraManager) .to receive(:supported_api_versions).and_return([3, 4]) + ovirt_service = ManageIQ::Providers::Redhat::InfraManager::OvirtServices::Strategies::V4 + allow_any_instance_of(ovirt_service) + .to receive(:collect_external_network_providers).and_return([]) + ems.save + end render_views