1
0
Fork 0
forked from gitea/nas

Merge remote-tracking branch 'parent/main' into kbtopic-remove-quote

This commit is contained in:
KMY 2025-05-07 09:39:51 +09:00
commit 9de0de7d65
66 changed files with 2420 additions and 1868 deletions

View file

@ -21,7 +21,7 @@ RSpec.describe ActivityPub::Activity::Create do
type: 'Create',
actor: ActivityPub::TagManager.instance.uri_for(sender),
object: object_json,
}.with_indifferent_access
}.deep_stringify_keys
end
let(:conversation_hash) do
@ -113,7 +113,7 @@ RSpec.describe ActivityPub::Activity::Create do
type: 'Create',
actor: ActivityPub::TagManager.instance.uri_for(sender),
object: json,
}.with_indifferent_access
}.deep_stringify_keys
end
before do
@ -2474,7 +2474,7 @@ RSpec.describe ActivityPub::Activity::Create do
type: 'Create',
actor: ActivityPub::TagManager.instance.uri_for(sender),
object: Addressable::URI.new(scheme: 'bear', query_values: { t: token, u: object_json[:id] }).to_s,
}.with_indifferent_access
}.deep_stringify_keys
end
let(:object_json) do

View file

@ -16,7 +16,7 @@ RSpec.describe ActivityPub::Parser::StatusParser do
type: 'Create',
actor: ActivityPub::TagManager.instance.uri_for(sender),
object: object_json,
}.with_indifferent_access
}.deep_stringify_keys
end
let(:object_json) do
@ -49,6 +49,24 @@ RSpec.describe ActivityPub::Parser::StatusParser do
)
end
context 'when the likes collection is not inlined' do
let(:object_json) do
{
id: [ActivityPub::TagManager.instance.uri_for(sender), 'post1'].join('/'),
type: 'Note',
to: 'https://www.w3.org/ns/activitystreams#Public',
content: 'bleh',
published: 1.hour.ago.utc.iso8601,
updated: 1.hour.ago.utc.iso8601,
likes: 'https://example.com/collections/likes',
}
end
it 'does not raise an error' do
expect { subject.favourites_count }.to_not raise_error
end
end
describe '#quote_policy' do
subject do
described_class