Default to json type for webfinger requests (#1583)
This commit is contained in:
parent
fd102059aa
commit
b352a8e5d4
4 changed files with 36 additions and 8 deletions
|
@ -14,12 +14,12 @@ RSpec.describe XrdController, type: :controller do
|
|||
let(:alice) { Fabricate(:account, username: 'alice') }
|
||||
|
||||
it 'returns http success when account can be found' do
|
||||
get :webfinger, params: { resource: alice.to_webfinger_s }
|
||||
get :webfinger, params: { resource: alice.to_webfinger_s }, format: :json
|
||||
expect(response).to have_http_status(:success)
|
||||
end
|
||||
|
||||
it 'returns http not found when account cannot be found' do
|
||||
get :webfinger, params: { resource: 'acct:not@existing.com' }
|
||||
get :webfinger, params: { resource: 'acct:not@existing.com' }, format: :json
|
||||
expect(response).to have_http_status(:not_found)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue