aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-02-13 16:13:42 +0000
committerLouise Crow <louise.crow@gmail.com>2015-02-23 11:22:06 +0000
commit0c3dd55f8d50f6d61212f4ee06ad39ba06db83a0 (patch)
tree053349e4e1486892a8c54accd55b85b62fe38195
parent45286785196eb9ca347742e82113b3ffdf01c410 (diff)
Include tag_string from csv in tags expected.
As I understand it, the expectation is to replace any existing tags with both the tag from the UI and the tags from the csv.
-rw-r--r--spec/models/public_body_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/public_body_spec.rb b/spec/models/public_body_spec.rb
index 5aae69ad2..dd6bc100d 100644
--- a/spec/models/public_body_spec.rb
+++ b/spec/models/public_body_spec.rb
@@ -518,7 +518,7 @@ describe PublicBody, " when loading CSV files" do
expect(PublicBody.find_by_name('Quango').tag_array_for_search).to eq(expected)
end
- it 'replaces with the import tag when a tag_string is specified' do
+ it 'replaces with the import tag and tag_string when a tag_string is specified' do
csv = <<-CSV.strip_heredoc
#id,request_email,name,tag_string,home_page
,q@localhost,Quango,first_tag second_tag,http://example.org
@@ -527,7 +527,7 @@ describe PublicBody, " when loading CSV files" do
# csv, tag, tag_behaviour, dry_run, editor
PublicBody.import_csv(csv, 'imported', 'replace', false, 'someadmin')
- expected = %W(imported)
+ expected = %W(first_tag imported second_tag)
expect(PublicBody.find_by_name('Quango').tag_array_for_search).to eq(expected)
end