Fix #3981: Inconsistency between posts and pools.

This commit is contained in:
evazion
2018-11-10 12:37:08 -06:00
parent 684e2bdbad
commit eade33fa7c
2 changed files with 10 additions and 2 deletions

View File

@@ -61,6 +61,13 @@ class PoolTest < ActiveSupport::TestCase
should "initialize the post count" do
assert_equal(@posts.size, @pool.post_count)
end
should "synchronize the posts with the pool" do
assert_equal(@posts.map(&:id), @pool.post_ids)
@posts.each(&:reload)
assert_equal(["pool:#{@pool.id} pool:series"] * @posts.size, @posts.map(&:pool_string))
end
end
context "Reverting a pool" do