1
0

accounts_controller_spec.rb 557 B

12345678910111213141516171819202122232425
  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