This commit is contained in:
r888888888
2013-05-21 18:02:35 -07:00
parent cb2e1e9f57
commit 54e5869dfc
2 changed files with 15 additions and 0 deletions

View File

@@ -31,6 +31,14 @@ class PostTest < ActiveSupport::TestCase
end
end
should "remove the post from all pools" do
pool = FactoryGirl.create(:pool)
pool.add!(@post)
@post.expunge!
pool.reload
assert_equal("", pool.post_ids)
end
should "destroy the record" do
@post.expunge!
assert_equal([], @post.errors.full_messages)