diff options
-rw-r--r-- | app/models/public_body.rb | 2 | ||||
-rw-r--r-- | spec/models/public_body_spec.rb | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index 2a701deb9..6537af7c1 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -192,7 +192,7 @@ class PublicBody < ActiveRecord::Base ActiveRecord::Base.transaction do for public_body_tag in self.public_body_tags - STDERR.puts("destroying tag " + public_body_tag.name) + # STDERR.puts("destroying tag " + public_body_tag.name) public_body_tag.destroy end for tag in tags diff --git a/spec/models/public_body_spec.rb b/spec/models/public_body_spec.rb index d48079ba1..0a0b95041 100644 --- a/spec/models/public_body_spec.rb +++ b/spec/models/public_body_spec.rb @@ -23,6 +23,11 @@ describe PublicBody, " using tags" do @public_body.tag_string.should == 'chesire lancashire' end + it 'should work with other white space' do + @public_body.tag_string = "chesire\n\tlancashire" + @public_body.tag_string.should == 'chesire lancashire' + end + it 'should remove tags when changing them' do @public_body.tag_string = 'stilton' @public_body.tag_string.should == 'stilton' |