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

@@ -45,7 +45,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
setup do
# flesh out profile to get more test coverage of user presenter.
@user = create(:banned_user, can_approve_posts: true, created_at: 2.weeks.ago)
as_user do
as(@user) do
create(:saved_search, user: @user)
create(:post, uploader: @user, tag_string: "fav:#{@user.name}")
end