well_known_routes_spec.rb 652 B

123456789101112131415161718192021222324
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe 'Well Known routes' do
  4. describe 'the host-meta route' do
  5. it 'routes to correct place' do
  6. expect(get('/.well-known/host-meta'))
  7. .to route_to('well_known/host_meta#show')
  8. end
  9. it 'routes to correct place with json format' do
  10. expect(get('/.well-known/host-meta.json'))
  11. .to route_to('well_known/host_meta#show', format: 'json')
  12. end
  13. end
  14. describe 'the webfinger route' do
  15. it 'routes to correct place with json format' do
  16. expect(get('/.well-known/webfinger'))
  17. .to route_to('well_known/webfinger#show')
  18. end
  19. end
  20. end