mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 00:08:46 +00:00
Merge commit '22e2e7f02b2f25f30abd6a616bc3b0b543b30279' into glitch-soc/merge-upstream
This commit is contained in:
@@ -20,7 +20,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
|
||||
|
||||
before do
|
||||
@@ -102,7 +102,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
|
||||
@@ -1126,7 +1126,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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user