mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-25 11:42:43 +00:00
Allow more flexible host/port treatment with LOCAL_DOMAIN values in tests (#35040)
This commit is contained in:
parent
b2506478ba
commit
ca3cc36549
9 changed files with 32 additions and 12 deletions
|
|
@ -31,7 +31,7 @@ RSpec.describe 'email confirmation flow when captcha is enabled' do
|
|||
|
||||
# It presents a page with a link to the app callback
|
||||
expect(page)
|
||||
.to have_content(I18n.t('auth.confirmations.registration_complete', domain: Rails.configuration.x.local_domain))
|
||||
.to have_content(I18n.t('auth.confirmations.registration_complete', domain: local_domain_uri.host))
|
||||
.and have_link(I18n.t('auth.confirmations.clicking_this_link'), href: client_app.confirmation_redirect_uri)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@ require 'rails_helper'
|
|||
RSpec.describe 'Profile' do
|
||||
include ProfileStories
|
||||
|
||||
let(:local_domain) { Rails.configuration.x.local_domain }
|
||||
|
||||
before do
|
||||
as_a_logged_in_user
|
||||
Fabricate(:user, account: Fabricate(:account, username: 'alice'))
|
||||
|
|
@ -16,7 +14,7 @@ RSpec.describe 'Profile' do
|
|||
visit account_path('alice')
|
||||
|
||||
expect(page)
|
||||
.to have_title("alice (@alice@#{local_domain})")
|
||||
.to have_title("alice (@alice@#{local_domain_uri.host})")
|
||||
end
|
||||
|
||||
it 'I can change my account' do
|
||||
|
|
|
|||
|
|
@ -31,6 +31,6 @@ RSpec.describe 'redirection confirmations' do
|
|||
end
|
||||
|
||||
def redirect_title
|
||||
I18n.t('redirects.title', instance: Rails.configuration.x.local_domain)
|
||||
I18n.t('redirects.title', instance: local_domain_uri.host)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue