Fix pool elements controller tests.

This commit is contained in:
evazion
2018-11-04 21:25:25 -06:00
parent 29b6121a07
commit 98cffc310b

View File

@@ -25,7 +25,7 @@ class PoolElementsControllerTest < ActionDispatch::IntegrationTest
end
should "add a post to a pool once and only once" do
@pool.add!(@post)
as_user { @pool.add!(@post) }
post_auth pool_element_path, @user, params: {:pool_id => @pool.id, :post_id => @post.id, :format => "json"}
@pool.reload
assert_equal([@post.id], @pool.post_id_array)
@@ -34,7 +34,7 @@ class PoolElementsControllerTest < ActionDispatch::IntegrationTest
context "destroy action" do
setup do
@pool.add!(@post)
as_user { @pool.add!(@post) }
end
should "remove a post from a pool" do