diff --git a/app/models/service_orchestration/provision_tagging.rb b/app/models/service_orchestration/provision_tagging.rb index 96a17d3bbea..c99062379c6 100644 --- a/app/models/service_orchestration/provision_tagging.rb +++ b/app/models/service_orchestration/provision_tagging.rb @@ -1,5 +1,5 @@ module ServiceOrchestration::ProvisionTagging - DIALOG_TAG_KEY_REGEX = /^Array::dialog_tag_(?\d*)_(?.*)/i + DIALOG_TAG_KEY_REGEX = /^dialog_tag_(?\d*)_(?.*)/i DIALOG_TAG_VALUE_REGEX = /Classification::(\d*)/ private diff --git a/spec/models/dialog_field_tag_control_spec.rb b/spec/models/dialog_field_tag_control_spec.rb index 8a3927cf754..475210d08f0 100644 --- a/spec/models/dialog_field_tag_control_spec.rb +++ b/spec/models/dialog_field_tag_control_spec.rb @@ -139,13 +139,13 @@ def add_entry(cat, options) it "automate_output_value with an single value" do tag = Classification.first @df.value = tag.id.to_s - expect(@df.automate_output_value).to eq([tag.id.to_s]) + expect(@df.automate_output_value).to eq(["#{tag.class.name}::#{tag.id}"]) end it "automate_output_value with multiple values" do tags = [Classification.first, Classification.last] @df.value = tags.collect(&:id).join(",") - expect(@df.automate_output_value).to match_array(tags.collect { |tag| tag.id.to_s }) + expect(@df.automate_output_value).to match_array(tags.collect { |tag| "#{tag.class.name}::#{tag.id}" }) end end end diff --git a/spec/models/service_orchestration/provision_tagging_spec.rb b/spec/models/service_orchestration/provision_tagging_spec.rb index b5d08356cc4..1d022f22d74 100644 --- a/spec/models/service_orchestration/provision_tagging_spec.rb +++ b/spec/models/service_orchestration/provision_tagging_spec.rb @@ -20,9 +20,9 @@ let(:service) { FactoryBot.build(:service_orchestration, :miq_request_task => miq_request_task) } let(:dialog_tag_options) do {:dialog => { - 'Array::dialog_tag_0_env' => 'Classification::1', - 'Array::dialog_tag_1_network' => 'Classification::11', - 'Array::dialog_tag_2_dept' => 'Classification::21,Classification::22,Classification::23' + 'dialog_tag_0_env' => 'Classification::1', + 'dialog_tag_1_network' => 'Classification::11', + 'dialog_tag_2_dept' => 'Classification::21,Classification::22,Classification::23' }} end