about summary refs log tree commit diff
path: root/spec/controllers/api/v1/admin
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-19 21:17:41 -0500
committerGitHub <noreply@github.com>2023-02-20 11:17:41 +0900
commit5179c47087e7807162f1466ec61a797586de007f (patch)
tree106d584a459714b39a3b2fe1a87492fa2cdedc74 /spec/controllers/api/v1/admin
parentaef0051fd0723ff03175a8851497056ed07d1a83 (diff)
Autofix Rubocops RSpec/ScatteredLet (#23725)
Diffstat (limited to 'spec/controllers/api/v1/admin')
-rw-r--r--spec/controllers/api/v1/admin/domain_blocks_controller_spec.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/controllers/api/v1/admin/domain_blocks_controller_spec.rb b/spec/controllers/api/v1/admin/domain_blocks_controller_spec.rb
index 606def602..b367ab9ce 100644
--- a/spec/controllers/api/v1/admin/domain_blocks_controller_spec.rb
+++ b/spec/controllers/api/v1/admin/domain_blocks_controller_spec.rb
@@ -73,16 +73,15 @@ RSpec.describe Api::V1::Admin::DomainBlocksController, type: :controller do
 
   describe 'PUT #update' do
     let!(:remote_account) { Fabricate(:account, domain: 'example.com') }
-    let(:domain_block)    { Fabricate(:domain_block, domain: 'example.com', severity: original_severity) }
+    let(:subject) do
+      post :update, params: { id: domain_block.id, domain: 'example.com', severity: new_severity }
+    end
+    let(:domain_block) { Fabricate(:domain_block, domain: 'example.com', severity: original_severity) }
 
     before do
       BlockDomainService.new.call(domain_block)
     end
 
-    let(:subject) do
-      post :update, params: { id: domain_block.id, domain: 'example.com', severity: new_severity }
-    end
-
     context 'downgrading a domain suspension to silence' do
       let(:original_severity) { 'suspend' }
       let(:new_severity)      { 'silence' }