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

21 lines
601 B

  1. require 'rails_helper'
  2. describe WellKnown::WebfingerController, type: :controller do
  3. render_views
  4. describe 'GET #show' do
  5. let(:alice) { Fabricate(:account, username: 'alice') }
  6. it 'returns http success when account can be found' do
  7. get :show, params: { resource: alice.to_webfinger_s }, format: :json
  8. expect(response).to have_http_status(:success)
  9. end
  10. it 'returns http not found when account cannot be found' do
  11. get :show, params: { resource: 'acct:not@existing.com' }, format: :json
  12. expect(response).to have_http_status(:not_found)
  13. end
  14. end
  15. end