From 18c82f1e75764f77ceb4c4df478de3f99f06b474 Mon Sep 17 00:00:00 2001 From: Madhu Kanoor Date: Wed, 11 Jan 2017 17:36:53 -0500 Subject: [PATCH] PR Review feedback --- lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object.rb | 2 +- spec/lib/miq_automation_engine/miq_ae_object_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object.rb b/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object.rb index ea608c78ec8..f3a746b453c 100644 --- a/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object.rb +++ b/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object.rb @@ -273,7 +273,7 @@ def process_args_attribute(args, args_key) key, klass = get_key_name_and_klass_from_key(args_key) value = args.delete(args_key) args["#{key}_id"] = value unless @attributes.key?(key) - args[key.downcase] = MiqAeObject.convert_value_based_on_datatype(value, klass) + args[key] = MiqAeObject.convert_value_based_on_datatype(value, klass) else args[args_key.downcase] = args.delete(args_key) if args_key != args_key.downcase end diff --git a/spec/lib/miq_automation_engine/miq_ae_object_spec.rb b/spec/lib/miq_automation_engine/miq_ae_object_spec.rb index b43864c1053..14838163dc7 100644 --- a/spec/lib/miq_automation_engine/miq_ae_object_spec.rb +++ b/spec/lib/miq_automation_engine/miq_ae_object_spec.rb @@ -79,9 +79,9 @@ def value_match(value, xml_value) "Name" => "fred") expect(result["vms"]).to be_kind_of(Array) expect(result["vms"].length).to eq(1) + expect(result["VMs"]).to be_nil expect(result["name"]).to eq("fred") expect(result["Name"]).to be_nil - expect(result["VMs"]).to be_nil end it "#process_args_as_attributes with an array" do