The code powering m.abunchtell.com https://m.abunchtell.com
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

27 rader
743 B

  1. require 'rails_helper'
  2. RSpec.describe XrdController, type: :controller do
  3. render_views
  4. describe 'GET #host_meta' do
  5. it 'returns http success' do
  6. get :host_meta
  7. expect(response).to have_http_status(:success)
  8. end
  9. end
  10. describe 'GET #webfinger' do
  11. let(:alice) { Fabricate(:account, username: 'alice') }
  12. it 'returns http success when account can be found' do
  13. get :webfinger, params: { resource: "acct:#{alice.username}@anything.com" }
  14. expect(response).to have_http_status(:success)
  15. end
  16. it 'returns http not found when account cannot be found' do
  17. get :webfinger, params: { resource: 'acct:not@existing.com' }
  18. expect(response).to have_http_status(:not_found)
  19. end
  20. end
  21. end