闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
597 B

  1. require 'rails_helper'
  2. describe Admin::SuspensionsController do
  3. let(:account) { Fabricate(:account) }
  4. before do
  5. sign_in Fabricate(:user, admin: true), scope: :user
  6. end
  7. describe 'POST #create' do
  8. it 'redirects to admin accounts page' do
  9. post :create, params: { account_id: account.id }
  10. expect(response).to redirect_to(admin_accounts_path)
  11. end
  12. end
  13. describe 'DELETE #destroy' do
  14. it 'redirects to admin accounts page' do
  15. delete :destroy, params: { account_id: account.id }
  16. expect(response).to redirect_to(admin_accounts_path)
  17. end
  18. end
  19. end