This commit is contained in:
Toks
2013-11-27 00:03:06 -05:00
parent cf7fabe487
commit ddc590e7e8
2 changed files with 16 additions and 0 deletions

View File

@@ -578,6 +578,15 @@ class PostTest < ActiveSupport::TestCase
end
end
context "tagged with a negated tag" do
should "remove the tag if present" do
@post.update_attributes(:tag_string => "aaa bbb ccc")
@post.update_attributes(:tag_string => "aaa bbb ccc -bbb")
@post.reload
assert_equal("aaa ccc", @post.tag_string)
end
end
should "have an array representation of its tags" do
post = FactoryGirl.create(:post)
post.set_tag_string("aaa bbb")