Merge commit '5a8ab0a3e62a8825e28bb74c1760ba6488d20c97' into glitch-soc/merge-upstream

This commit is contained in:
Claire
2025-10-15 16:35:37 +02:00
50 changed files with 320 additions and 212 deletions

View File

@@ -12,11 +12,11 @@ RSpec.describe Auth::RegistrationsController do
allow(Rails.configuration.x).to receive(:single_user_mode).and_return(true)
end
it 'redirects to root' do
it 'redirects to sign-in' do
Fabricate(:account)
get path
expect(response).to redirect_to '/'
expect(response).to redirect_to '/auth/sign_in'
expect(Rails.configuration.x).to have_received(:single_user_mode)
end
end
@@ -27,10 +27,10 @@ RSpec.describe Auth::RegistrationsController do
allow(Rails.configuration.x).to receive(:single_user_mode).and_return(false)
end
it 'redirects to root' do
it 'redirects to sign-in' do
get path
expect(response).to redirect_to '/'
expect(response).to redirect_to '/auth/sign_in'
expect(Rails.configuration.x).to have_received(:single_user_mode)
end
end

View File

@@ -58,7 +58,7 @@ RSpec.describe AccountControllerConcern do
expect(response)
.to have_http_status(200)
.and have_http_link_header(webfinger_url(resource: account.to_webfinger_s)).for(rel: 'lrdd', type: 'application/jrd+json')
.and have_http_link_header(account_url(account, protocol: :https)).for(rel: 'alternate', type: 'application/activity+json')
.and have_http_link_header(ActivityPub::TagManager.instance.uri_for(account)).for(rel: 'alternate', type: 'application/activity+json')
expect(response.body)
.to include(account.username)
end

View File

@@ -49,8 +49,8 @@ RSpec.describe FollowerAccountsController do
expect(response.parsed_body)
.to include(
orderedItems: contain_exactly(
include(follow_from_bob.account.username),
include(follow_from_chris.account.username)
ActivityPub::TagManager.instance.uri_for(follow_from_bob.account),
ActivityPub::TagManager.instance.uri_for(follow_from_chris.account)
),
totalItems: eq(2),
partOf: be_present

View File

@@ -49,8 +49,8 @@ RSpec.describe FollowingAccountsController do
expect(response.parsed_body)
.to include(
orderedItems: contain_exactly(
include(follow_of_bob.target_account.username),
include(follow_of_chris.target_account.username)
ActivityPub::TagManager.instance.uri_for(follow_of_bob.target_account),
ActivityPub::TagManager.instance.uri_for(follow_of_chris.target_account)
),
totalItems: eq(2),
partOf: be_present