闭社主体 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.

26 lines
613 B

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