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
736 B

  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe ActivityPub::CollectionsController, type: :controller do
  4. describe 'POST #show' do
  5. let(:account) { Fabricate(:account) }
  6. context 'id is "featured"' do
  7. it 'returns 200 with "application/activity+json"' do
  8. post :show, params: { id: 'featured', account_username: account.username }
  9. expect(response).to have_http_status(200)
  10. expect(response.content_type).to eq 'application/activity+json'
  11. end
  12. end
  13. context 'id is not "featured"' do
  14. it 'returns 404' do
  15. post :show, params: { id: 'hoge', account_username: account.username }
  16. expect(response).to have_http_status(404)
  17. end
  18. end
  19. end
  20. end