From 98cffc310ba6e18511e799c7fc4e567d19f32d5f Mon Sep 17 00:00:00 2001 From: evazion Date: Sun, 4 Nov 2018 21:25:25 -0600 Subject: [PATCH] Fix pool elements controller tests. --- test/functional/pool_elements_controller_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/pool_elements_controller_test.rb b/test/functional/pool_elements_controller_test.rb index 39107c920..99627d6a4 100644 --- a/test/functional/pool_elements_controller_test.rb +++ b/test/functional/pool_elements_controller_test.rb @@ -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