0
0
Fork 0

Fix RSpec/ScatteredSetup cop (#24848)

This commit is contained in:
Matt Jankowski 2023-05-11 04:32:09 -04:00 committed by GitHub
parent 9cbda99941
commit a610a02d4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 23 deletions

View file

@ -5,16 +5,16 @@ require 'rails_helper'
RSpec.describe Admin::Disputes::AppealsController do
render_views
before { sign_in current_user, scope: :user }
before do
sign_in current_user, scope: :user
target_account.suspend!
end
let(:target_account) { Fabricate(:account) }
let(:strike) { Fabricate(:account_warning, target_account: target_account, action: :suspend) }
let(:appeal) { Fabricate(:appeal, strike: strike, account: target_account) }
before do
target_account.suspend!
end
describe 'POST #approve' do
let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }