Fix pool elements controller tests.
This commit is contained in:
@@ -25,7 +25,7 @@ class PoolElementsControllerTest < ActionDispatch::IntegrationTest
|
|||||||
end
|
end
|
||||||
|
|
||||||
should "add a post to a pool once and only once" do
|
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"}
|
post_auth pool_element_path, @user, params: {:pool_id => @pool.id, :post_id => @post.id, :format => "json"}
|
||||||
@pool.reload
|
@pool.reload
|
||||||
assert_equal([@post.id], @pool.post_id_array)
|
assert_equal([@post.id], @pool.post_id_array)
|
||||||
@@ -34,7 +34,7 @@ class PoolElementsControllerTest < ActionDispatch::IntegrationTest
|
|||||||
|
|
||||||
context "destroy action" do
|
context "destroy action" do
|
||||||
setup do
|
setup do
|
||||||
@pool.add!(@post)
|
as_user { @pool.add!(@post) }
|
||||||
end
|
end
|
||||||
|
|
||||||
should "remove a post from a pool" do
|
should "remove a post from a pool" do
|
||||||
|
|||||||
Reference in New Issue
Block a user