#2030: Fix regression that borked the -pool: metatag

This commit is contained in:
Toks
2013-11-26 23:27:40 -05:00
parent c37f949f17
commit f1455c1f77
2 changed files with 18 additions and 6 deletions

View File

@@ -492,6 +492,23 @@ class PostTest < ActiveSupport::TestCase
end
end
context "negated" do
setup do
@pool = FactoryGirl.create(:pool)
@post = FactoryGirl.create(:post, :tag_string => "aaa")
@post.add_pool!(@pool)
@post.tag_string = "aaa -pool:#{@pool.id}"
@post.save
end
should "remove the post from the pool" do
@post.reload
@pool.reload
assert_equal("", @pool.post_ids)
assert_equal("", @post.pool_string)
end
end
context "id" do
setup do
@pool = FactoryGirl.create(:pool)