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.

23 lines
541 B

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