Fix test failures when removing posts from deleted pools.

These tests failed because removing posts from deleted pools is now
Builder-only.
This commit is contained in:
evazion
2017-11-26 18:10:08 -06:00
parent 255082d3b5
commit 4939c0345a
2 changed files with 6 additions and 0 deletions

View File

@@ -111,6 +111,9 @@ class PostTest < ActiveSupport::TestCase
context "that belongs to a pool" do
setup do
# must be a builder to update deleted pools. must be >1 week old to remove posts from pools.
CurrentUser.user = FactoryGirl.create(:builder_user, created_at: 1.month.ago)
SqsService.any_instance.stubs(:send_message)
@pool = FactoryGirl.create(:pool)
@pool.add!(@post)