Reduce hard coding of LOCAL_DOMAIN env value throughout tests (#35025)
This commit is contained in:
parent
f92ff6d699
commit
ab7f50ce4e
15 changed files with 69 additions and 37 deletions
|
|
@ -26,8 +26,8 @@ RSpec.describe 'The /.well-known/webfinger endpoint' do
|
|||
|
||||
expect(response.parsed_body)
|
||||
.to include(
|
||||
subject: eq('acct:alice@cb6e6126.ngrok.io'),
|
||||
aliases: include('https://cb6e6126.ngrok.io/@alice', 'https://cb6e6126.ngrok.io/users/alice')
|
||||
subject: eq(alice.to_webfinger_s),
|
||||
aliases: include("https://#{Rails.configuration.x.local_domain}/@alice", "https://#{Rails.configuration.x.local_domain}/users/alice")
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
@ -125,10 +125,14 @@ RSpec.describe 'The /.well-known/webfinger endpoint' do
|
|||
|
||||
expect(response.parsed_body)
|
||||
.to include(
|
||||
subject: 'acct:mastodon.internal@cb6e6126.ngrok.io',
|
||||
aliases: ['https://cb6e6126.ngrok.io/actor']
|
||||
subject: instance_actor.to_webfinger_s,
|
||||
aliases: [instance_actor_url]
|
||||
)
|
||||
end
|
||||
|
||||
def instance_actor
|
||||
Account.where(id: Account::INSTANCE_ACTOR_ID).first
|
||||
end
|
||||
end
|
||||
|
||||
context 'with no resource parameter' do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue