2017-04-19 13:52:37 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'rails_helper'
|
|
|
|
|
2024-09-04 07:12:25 +02:00
|
|
|
RSpec.describe 'Link headers' do
|
2017-04-19 13:52:37 +02:00
|
|
|
describe 'on the account show page' do
|
|
|
|
let(:account) { Fabricate(:account, username: 'test') }
|
|
|
|
|
2024-09-05 22:05:38 +02:00
|
|
|
it 'contains webfinger and activitypub urls in link header' do
|
2017-04-19 13:52:37 +02:00
|
|
|
get short_account_path(username: account)
|
|
|
|
|
2024-09-05 22:05:38 +02:00
|
|
|
expect(response)
|
|
|
|
.to have_http_link_header('https://cb6e6126.ngrok.io/.well-known/webfinger?resource=acct%3Atest%40cb6e6126.ngrok.io').for(rel: 'lrdd', type: 'application/jrd+json')
|
|
|
|
.and have_http_link_header('https://cb6e6126.ngrok.io/users/test').for(rel: 'alternate', type: 'application/activity+json')
|
2017-04-19 13:52:37 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|