tests: eliminate as_user helper.
This commit is contained in:
@@ -7,7 +7,7 @@ class PoolsControllerTest < ActionDispatch::IntegrationTest
|
||||
@user = create(:user)
|
||||
@mod = create(:moderator_user)
|
||||
end
|
||||
as_user do
|
||||
as(@user) do
|
||||
@post = create(:post)
|
||||
@pool = create(:pool)
|
||||
end
|
||||
@@ -112,9 +112,7 @@ class PoolsControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
|
||||
should "not allow reverting to a previous version of another pool" do
|
||||
as_user do
|
||||
@pool2 = create(:pool)
|
||||
end
|
||||
@pool2 = as(@user) { create(:pool) }
|
||||
put_auth revert_pool_path(@pool), @user, params: {:version_id => @pool2.versions.first.id }
|
||||
@pool.reload
|
||||
assert_not_equal(@pool.name, @pool2.name)
|
||||
|
||||
Reference in New Issue
Block a user