mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-12-05 13:04:59 +00:00
21a767dcfa
This change includes: - Improve the spec coverage for incoming request to the webfinger action - For requests without an accept header (ie, what a browser might look like), return a JSON response. - For requests with an explicit format of xml or json, return that format. - For requests using an accept header, return that format. Also adds failing spec showing webfinger does not return xml, which covers the issue described in: https://github.com/tootsuite/mastodon/issues/1983
16 lines
409 B
Ruby
16 lines
409 B
Ruby
require 'rails_helper'
|
|
|
|
describe 'the host-meta route' do
|
|
it 'routes to correct place with xml format' do
|
|
expect(get('/.well-known/host-meta')).
|
|
to route_to('well_known/host_meta#show', format: 'xml')
|
|
end
|
|
end
|
|
|
|
describe 'the webfinger route' do
|
|
it 'routes to correct place with json format' do
|
|
expect(get('/.well-known/webfinger')).
|
|
to route_to('well_known/webfinger#show')
|
|
end
|
|
end
|