about summary refs log tree commit diff
path: root/spec/controllers/admin
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2022-03-30 12:33:18 -0500
committerStarfall <us@starfall.systems>2022-03-30 12:33:18 -0500
commitf7491de676298b8f78084c00f0026f8cf36d92fc (patch)
tree0ac29d1598efeb2a0de9bd1b54ae7590e88479da /spec/controllers/admin
parentf37056e6c351a08d09c3986586cc7d27bdea85ab (diff)
parent363773d0e9ffa9f4efc564603327f225193a2bf1 (diff)
Update to Mastodon 2.5.0
Merge remote-tracking branch 'glitch/main'
Diffstat (limited to 'spec/controllers/admin')
-rw-r--r--spec/controllers/admin/accounts_controller_spec.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/controllers/admin/accounts_controller_spec.rb b/spec/controllers/admin/accounts_controller_spec.rb
index 0f71d697c..1779fb7c0 100644
--- a/spec/controllers/admin/accounts_controller_spec.rb
+++ b/spec/controllers/admin/accounts_controller_spec.rb
@@ -194,9 +194,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
   end
 
   describe 'POST #unblock_email' do
-    subject do
-      -> { post :unblock_email, params: { id: account.id } }
-    end
+    subject { post :unblock_email, params: { id: account.id } }
 
     let(:current_user) { Fabricate(:user, admin: admin) }
     let(:account) { Fabricate(:account, suspended: true) }
@@ -206,11 +204,11 @@ RSpec.describe Admin::AccountsController, type: :controller do
       let(:admin) { true }
 
       it 'succeeds in removing email blocks' do
-        is_expected.to change { CanonicalEmailBlock.where(reference_account: account).count }.from(1).to(0)
+        expect { subject }.to change { CanonicalEmailBlock.where(reference_account: account).count }.from(1).to(0)
       end
 
       it 'redirects to admin account path' do
-        subject.call
+        subject
         expect(response).to redirect_to admin_account_path(account.id)
       end
     end
@@ -219,7 +217,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
       let(:admin) { false }
 
       it 'fails to remove avatar' do
-        subject.call
+        subject
         expect(response).to have_http_status :forbidden
       end
     end