about summary refs log tree commit diff
path: root/spec/controllers/admin/suspensions_controller_spec.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-12-23 11:28:28 +0100
committerThibaut Girka <thib@sitedethib.com>2018-12-23 11:28:28 +0100
commit3e686beaea1931c76c778d8ca6b03c41caaf69db (patch)
treef659a52ba0245daf2c7776e63c3a5012f906552a /spec/controllers/admin/suspensions_controller_spec.rb
parent1a3088364fe602bb48647d78dda440b174424e17 (diff)
parente25947db4a44cd50fa1daa36d5031a950327b646 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- config/routes.rb
  Upstream changed some admin routes, conflict was because of an added :show
  action for statuses on our side. Kept it.
Diffstat (limited to 'spec/controllers/admin/suspensions_controller_spec.rb')
-rw-r--r--spec/controllers/admin/suspensions_controller_spec.rb39
1 files changed, 0 insertions, 39 deletions
diff --git a/spec/controllers/admin/suspensions_controller_spec.rb b/spec/controllers/admin/suspensions_controller_spec.rb
deleted file mode 100644
index 1bc33e490..000000000
--- a/spec/controllers/admin/suspensions_controller_spec.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-require 'rails_helper'
-
-describe Admin::SuspensionsController do
-  render_views
-
-  before do
-    sign_in Fabricate(:user, admin: true), scope: :user
-  end
-
-  describe 'GET #new' do
-    it 'returns 200' do
-      get :new, params: { account_id: Fabricate(:account).id, report_id: Fabricate(:report).id }
-      expect(response).to have_http_status(200)
-    end
-  end
-
-  describe 'POST #create' do
-    it 'redirects to admin accounts page' do
-      account = Fabricate(:account, suspended: false)
-      expect(Admin::SuspensionWorker).to receive(:perform_async).with(account.id)
-
-      post :create, params: { account_id: account.id, form_admin_suspension_confirmation: { acct: account.acct } }
-
-      expect(response).to redirect_to(admin_accounts_path)
-    end
-  end
-
-  describe 'DELETE #destroy' do
-    it 'redirects to admin accounts page' do
-      account = Fabricate(:account, suspended: true)
-
-      delete :destroy, params: { account_id: account.id }
-
-      account.reload
-      expect(account.suspended?).to eq false
-      expect(response).to redirect_to(admin_accounts_path)
-    end
-  end
-end