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.

31 lines
880 B

  1. require 'rails_helper'
  2. RSpec.describe AccountsController, type: :controller do
  3. let(:alice) { Fabricate(:account, username: 'alice') }
  4. describe 'GET #show' do
  5. it 'returns http success' do
  6. get :show, params: { username: alice.username }
  7. expect(response).to have_http_status(:success)
  8. end
  9. it 'returns http success with Atom' do
  10. get :show, params: { username: alice.username }, format: 'atom'
  11. expect(response).to have_http_status(:success)
  12. end
  13. end
  14. describe 'GET #followers' do
  15. it 'returns http success' do
  16. get :followers, params: { username: alice.username }
  17. expect(response).to have_http_status(:success)
  18. end
  19. end
  20. describe 'GET #following' do
  21. it 'returns http success' do
  22. get :following, params: { username: alice.username }
  23. expect(response).to have_http_status(:success)
  24. end
  25. end
  26. end