2017-04-19 11:52:37 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'rails_helper'
|
|
|
|
|
2024-09-04 05:12:25 +00:00
|
|
|
RSpec.describe 'Link headers' do
|
2017-04-19 11:52:37 +00:00
|
|
|
describe 'on the account show page' do
|
|
|
|
let(:account) { Fabricate(:account, username: 'test') }
|
|
|
|
|
2024-09-05 20:05:38 +00:00
|
|
|
it 'contains webfinger and activitypub urls in link header' do
|
2017-04-19 11:52:37 +00:00
|
|
|
get short_account_path(username: account)
|
|
|
|
|
2024-09-05 20:05:38 +00: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 11:52:37 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|