Allow more flexible host/port treatment with LOCAL_DOMAIN values in tests (#35040)

This commit is contained in:
Matt Jankowski authored and GitHub committed 2025-06-16 13:12:23 +00:00
1 parent b2506478ba
commit ca3cc36549
9 files changed
+32 -12

No files matched your search

+10 -1
View File
@@ -61,7 +61,16 @@ RSpec.describe RemoteFollow do
let(:account) { Fabricate(:account, username: 'alice') }
it 'returns subscribe address' do
expect(subject).to eq "https://quitter.no/main/ostatussub?profile=https%3A%2F%2F#{Rails.configuration.x.local_domain}%2Fusers%2Falice"
expect(subject).to eq(expected_subscribe_url)
end
def expected_subscribe_url
Addressable::URI.new(
host: 'quitter.no',
path: '/main/ostatussub',
query_values: { profile: "https://#{Rails.configuration.x.local_domain}/users/alice" },
scheme: 'https'
).to_s
end
end
end