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