0
0
Fork 0

Fix RSpec/InstanceVariable cop (#27766)

This commit is contained in:
Matt Jankowski 2023-11-08 10:42:30 -05:00 committed by GitHub
parent 4329616c53
commit 69d00e2721
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 97 additions and 124 deletions

View file

@ -5,9 +5,10 @@ require 'rails_helper'
RSpec.describe StatusesCleanupController do
render_views
let!(:user) { Fabricate(:user) }
before do
@user = Fabricate(:user)
sign_in @user, scope: :user
sign_in user, scope: :user
end
describe 'GET #show' do
@ -30,9 +31,9 @@ RSpec.describe StatusesCleanupController do
end
it 'updates the account status cleanup policy' do
expect(@user.account.statuses_cleanup_policy.enabled).to be true
expect(@user.account.statuses_cleanup_policy.keep_direct).to be false
expect(@user.account.statuses_cleanup_policy.keep_polls).to be true
expect(user.account.statuses_cleanup_policy.enabled).to be true
expect(user.account.statuses_cleanup_policy.keep_direct).to be false
expect(user.account.statuses_cleanup_policy.keep_polls).to be true
end
it 'redirects' do