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 bfdc01d.
  • Loading branch information
Fryguy committed Sep 6, 2024
1 parent a89653a commit e30ab9d
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 e30ab9d

Please sign in to comment.