Skip to content

Commit

Permalink
Fix dialog tag specs
Browse files Browse the repository at this point in the history
  • Loading branch information
GilbertCherrie committed Aug 12, 2024
1 parent 46c992a commit 68ce78f
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 2 deletions.
103 changes: 103 additions & 0 deletions .byebug_history
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
c
value
if value.length == 1
obj = value[0]
obj.kind_of?(ActiveRecord::Base) ? "#{obj.class.name}::#{obj.id}" : obj.to_s
else
value.collect do |obj|
obj.kind_of?(ActiveRecord::Base) ? "#{obj.class.name}::#{obj.id}" : obj.to_s
end
end
c
value.collect do |obj|
obj.kind_of?(ActiveRecord::Base) ? "#{obj.class.name}::#{obj.id}" : obj.to_s
end
if value.length == 1
value[0]
end
value
value.collect do |obj|
obj.kind_of?(ActiveRecord::Base) ? "#{obj.class.name}::#{obj.id}" : obj.to_s
end
value
c
args
c
args
c
args
c
value
value[0]
value[0].kind_of?(Classification)
value[0].kind_of?(Classification0)
value[0].kind_of?(Classification)
value[0].kind_of?
value[0]
value
c
value
c
value
obj
c
value
c
value
c
value
c
args.keys
c
args.keys
args
c
ae_attrs
c
a.kind_of?(ActiveRecord::Base)
a = ["1"]
value[0].kind_of?(ActiveRecord::Base)
value[0]..kind_of?(ActiveRecord::Base)
value[0]
value
obj.kind_of?(ActiveRecord::Base)
value
c
value
c
value
c
params
method
c
params
method
c
param
c
method
c
params
method
c
params
c
method
c
set_playbook_data
method
c
method&.options
c
method&.options
method
c
method
c
method = params[:id] != "new" ? find_record_with_rbac(MiqAeMethod, params[:id]) : MiqAeMethod.newc
method = params[:id] != "new" ? find_record_with_rbac(MiqAeMethod, params[:id]) : MiqAeMethod.new
c
method = params[:id] != "new" ? find_record_with_rbac(MiqAeMethod, params[:id]) : MiqAeMethod.new
c
set_playbook_data
params
4 changes: 2 additions & 2 deletions spec/models/dialog_field_tag_control_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 68ce78f

Please sign in to comment.