Skip to content

Commit

Permalink
Revert "Merge pull request #23078 from GilbertCherrie/fix_dialog_tag_…
Browse files Browse the repository at this point in the history
…specs"

This reverts commit f133c62, reversing
changes made to 77e5f7a.
  • Loading branch information
Fryguy committed Nov 4, 2024
1 parent dca9857 commit 1b2f4e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/models/dialog_field_tag_control_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def add_entry(cat, options)
end

it "#automate_key_name" do
expect(@df.automate_key_name).to eq("dialog_#{@df.name}")
expect(@df.automate_key_name).to eq("Array::dialog_#{@df.name}")
end

describe "#initialize_with_values" do
Expand Down Expand Up @@ -133,19 +133,19 @@ def add_entry(cat, options)
end

it "automate_output_value with an empty value" do
expect(@df.automate_output_value).to eq([])
expect(@df.automate_output_value).to eq("")
end

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.split("\x1F")).to match_array(tags.collect { |tag| "#{tag.class.name}::#{tag.id}" })
end
end
end
Expand Down

0 comments on commit 1b2f4e7

Please sign in to comment.