tests: eliminate as_user helper.

This commit is contained in:
evazion
2020-06-11 01:02:01 -05:00
parent 2d05004bef
commit 99a9149fc4
24 changed files with 84 additions and 130 deletions

View File

@@ -23,7 +23,7 @@ class PostAppealsControllerTest < ActionDispatch::IntegrationTest
context "index action" do
setup do
as_user do
as(@user) do
@post = create(:post, :is_deleted => true)
@post_appeal = create(:post_appeal, :post => @post)
end
@@ -49,9 +49,7 @@ class PostAppealsControllerTest < ActionDispatch::IntegrationTest
context "create action" do
setup do
as_user do
@post = create(:post, :is_deleted => true)
end
@post = as(@user) { create(:post, is_deleted: true) }
end
should "create a new appeal" do