diff options
author | ThibG <thib@sitedethib.com> | 2019-06-04 23:24:31 +0200 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-11-19 16:32:40 -0600 |
commit | 61d29f59fbe979d0457d87b72470b2d99e6c241c (patch) | |
tree | e7eac8c2d58eff91223ab94d7fc6883addf27e16 /spec/lib/activitypub | |
parent | 3873a9e9af22d591a0890f37cde0be693c5ae441 (diff) |
Do not misattribute inlined boosts if `attributedTo` isn't present (#10967)
* Do not misattribute inlined boosts if `attributedTo` isn't present Fixes #10950 * Fix tests
Diffstat (limited to 'spec/lib/activitypub')
-rw-r--r-- | spec/lib/activitypub/activity/announce_spec.rb | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/spec/lib/activitypub/activity/announce_spec.rb b/spec/lib/activitypub/activity/announce_spec.rb index 926083a4f..60fd96a18 100644 --- a/spec/lib/activitypub/activity/announce_spec.rb +++ b/spec/lib/activitypub/activity/announce_spec.rb @@ -58,21 +58,6 @@ RSpec.describe ActivityPub::Activity::Announce do end end - context 'self-boost of a previously unknown status with missing attributedTo' do - let(:object_json) do - { - id: 'https://example.com/actor#bar', - type: 'Note', - content: 'Lorem ipsum', - to: 'http://example.com/followers', - } - end - - it 'creates a reblog by sender of status' do - expect(sender.reblogged?(sender.statuses.first)).to be true - end - end - context 'self-boost of a previously unknown status with correct attributedTo' do let(:object_json) do { @@ -122,6 +107,7 @@ RSpec.describe ActivityPub::Activity::Announce do type: 'Note', content: 'Lorem ipsum', to: 'http://example.com/followers', + attributedTo: 'https://example.com/actor', } end @@ -141,6 +127,7 @@ RSpec.describe ActivityPub::Activity::Announce do type: 'Note', content: 'Lorem ipsum', to: 'http://example.com/followers', + attributedTo: 'https://example.com/actor', } end @@ -161,6 +148,7 @@ RSpec.describe ActivityPub::Activity::Announce do type: 'Note', content: 'Lorem ipsum', to: 'http://example.com/followers', + attributedTo: 'https://example.com/actor', } end |