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

25 lines
557 B

  1. require 'rails_helper'
  2. RSpec.describe Admin::AccountsController, type: :controller do
  3. render_views
  4. before do
  5. sign_in Fabricate(:user, admin: true), scope: :user
  6. end
  7. describe 'GET #index' do
  8. it 'returns http success' do
  9. get :index
  10. expect(response).to have_http_status(:success)
  11. end
  12. end
  13. describe 'GET #show' do
  14. let(:account) { Fabricate(:account, username: 'bob') }
  15. it 'returns http success' do
  16. get :show, params: { id: account.id }
  17. expect(response).to have_http_status(:success)
  18. end
  19. end
  20. end