From f525b1030aea621d5269817d8942d5062c28cc97 Mon Sep 17 00:00:00 2001 From: Madhu Kanoor Date: Wed, 12 Dec 2018 13:59:51 -0500 Subject: [PATCH] Merge pull request #275 from gmcculloug/fix_transformation_plan_task_spec Add resource to conversion_host to pass validation (cherry picked from commit 29cb3f9f65561e4325f7eefa3b2bcc65449ccda9) --- ...ervice_service_template_transformation_plan_task_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/service_models/miq_ae_service_service_template_transformation_plan_task_spec.rb b/spec/service_models/miq_ae_service_service_template_transformation_plan_task_spec.rb index ef8d56994..29c07ae4e 100644 --- a/spec/service_models/miq_ae_service_service_template_transformation_plan_task_spec.rb +++ b/spec/service_models/miq_ae_service_service_template_transformation_plan_task_spec.rb @@ -1,6 +1,8 @@ describe MiqAeMethodService::MiqAeServiceServiceTemplateTransformationPlanTask do - let(:conversion_host_1) { FactoryGirl.create(:conversion_host) } - let(:conversion_host_2) { FactoryGirl.create(:conversion_host) } + let(:host) { FactoryBot.create(:host) } + let(:vm) { FactoryBot.create(:vm_or_template) } + let(:conversion_host_1) { FactoryBot.create(:conversion_host, :resource => host) } + let(:conversion_host_2) { FactoryBot.create(:conversion_host, :resource => vm) } let(:service_conversion_host_2) { MiqAeMethodService::MiqAeServiceConversionHost.find(conversion_host_2.id) } let(:task) { FactoryGirl.create(:service_template_transformation_plan_task, :conversion_host => conversion_host_1) } let(:service_task) { MiqAeMethodService::MiqAeServiceServiceTemplateTransformationPlanTask.find(task.id) }