1
0
Fork 0
forked from gitea/nas

#79 LocalPublickmyblue:LocalPublicに変更

This commit is contained in:
KMY 2023-10-11 09:40:04 +09:00
parent d93c64b6e1
commit 6823ae3bae
4 changed files with 14 additions and 14 deletions

View file

@ -236,13 +236,13 @@ RSpec.describe ActivityPub::Activity::Create do
end
end
context 'when public_unlisted with LocalPublic' do
context 'when public_unlisted with kmyblue:LocalPublic' do
let(:object_json) do
{
id: [ActivityPub::TagManager.instance.uri_for(sender), '#bar'].join,
type: 'Note',
content: 'Lorem ipsum',
to: ['http://example.com/followers', 'LocalPublic'],
to: ['http://example.com/followers', 'kmyblue:LocalPublic'],
cc: 'https://www.w3.org/ns/activitystreams#Public',
}
end
@ -255,13 +255,13 @@ RSpec.describe ActivityPub::Activity::Create do
end
end
context 'when public_unlisted with LocalPublic from friend-server' do
context 'when public_unlisted with kmyblue:LocalPublic from friend-server' do
let(:object_json) do
{
id: [ActivityPub::TagManager.instance.uri_for(sender), '#bar'].join,
type: 'Note',
content: 'Lorem ipsum',
to: ['http://example.com/followers', 'LocalPublic'],
to: ['http://example.com/followers', 'kmyblue:LocalPublic'],
cc: 'https://www.w3.org/ns/activitystreams#Public',
}
end
@ -452,8 +452,8 @@ RSpec.describe ActivityPub::Activity::Create do
end
end
context 'with public_unlisted with LocalPublic' do
let(:searchable_by) { ['http://example.com/followers', 'LocalPublic'] }
context 'with public_unlisted with kmyblue:LocalPublic' do
let(:searchable_by) { ['http://example.com/followers', 'kmyblue:LocalPublic'] }
it 'create status' do
status = sender.statuses.first
@ -463,8 +463,8 @@ RSpec.describe ActivityPub::Activity::Create do
end
end
context 'with public_unlisted with LocalPublic from friend-server' do
let(:searchable_by) { ['http://example.com/followers', 'LocalPublic'] }
context 'with public_unlisted with kmyblue:LocalPublic from friend-server' do
let(:searchable_by) { ['http://example.com/followers', 'kmyblue:LocalPublic'] }
let(:active_friend) { true }
it 'create status' do

View file

@ -77,7 +77,7 @@ RSpec.describe ActivityPub::TagManager do
describe '#to_for_friend' do
it 'returns followers collection for public_unlisted status' do
status = Fabricate(:status, visibility: :public_unlisted)
expect(subject.to_for_friend(status)).to eq [account_followers_url(status.account), 'LocalPublic']
expect(subject.to_for_friend(status)).to eq [account_followers_url(status.account), 'kmyblue:LocalPublic']
end
it 'returns followers collection for unlisted status' do
@ -200,7 +200,7 @@ RSpec.describe ActivityPub::TagManager do
it 'returns public collection for public_unlisted status' do
status = Fabricate(:status, account: Fabricate(:account, searchability: :public), searchability: :public_unlisted)
expect(subject.searchable_by_for_friend(status)).to eq [account_followers_url(status.account), 'LocalPublic']
expect(subject.searchable_by_for_friend(status)).to eq [account_followers_url(status.account), 'kmyblue:LocalPublic']
end
it 'returns followers collection for private status' do