mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-22 06:43:19 +00:00
Fix FetchFeaturedCollectionService
spec (#19401)
Regression from #19380
This commit is contained in:
parent
5e908c5a95
commit
94feb2b93f
|
@ -43,8 +43,7 @@ class ActivityPub::FetchFeaturedCollectionService < BaseService
|
||||||
|
|
||||||
def process_note_items(items)
|
def process_note_items(items)
|
||||||
status_ids = items.filter_map do |item|
|
status_ids = items.filter_map do |item|
|
||||||
type = item['type']
|
next unless item.is_a?(String) || item['type'] == 'Note'
|
||||||
next unless type == 'Note'
|
|
||||||
|
|
||||||
uri = value_or_id(item)
|
uri = value_or_id(item)
|
||||||
next if ActivityPub::TagManager.instance.local_uri?(uri)
|
next if ActivityPub::TagManager.instance.local_uri?(uri)
|
||||||
|
|
|
@ -65,7 +65,7 @@ RSpec.describe ActivityPub::FetchFeaturedCollectionService, type: :service do
|
||||||
stub_request(:get, 'https://example.com/account/pinned/3').to_return(status: 404)
|
stub_request(:get, 'https://example.com/account/pinned/3').to_return(status: 404)
|
||||||
stub_request(:get, 'https://example.com/account/pinned/4').to_return(status: 200, body: Oj.dump(status_json_4))
|
stub_request(:get, 'https://example.com/account/pinned/4').to_return(status: 200, body: Oj.dump(status_json_4))
|
||||||
|
|
||||||
subject.call(actor)
|
subject.call(actor, note: true, hashtag: false)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets expected posts as pinned posts' do
|
it 'sets expected posts as pinned posts' do
|
||||||
|
|
Loading…
Reference in a new issue