about summary refs log tree commit diff
path: root/spec/workers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-08-11 17:48:42 +0200
committerGitHub <noreply@github.com>2021-08-11 17:48:42 +0200
commit5efb1ff337e7c1c090eb9c43dc3ba5b284302460 (patch)
tree69bc9aaed828592a56c91944120e331b35ab9b50 /spec/workers
parent13b08610a08faf2909f7c871be62da955d9293d3 (diff)
Fix followers synchronization mechanism not working when URI has empty path (#16510)
* Fix followers synchronization mechanism not working when URI has empty path

To my knowledge, there is no current implementation on the fediverse
that can use bare domains (e.g., actor is at https://example.org instead of
something like https://example.org/actor) that also plans to support the
followers synchronization mechanism. However, Mastodon's current implementation
would exclude such accounts from followers list.

Also adds tests and rename them to reflect the proper method names.

* Move url prefix regexp to its own constant
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/activitypub/delivery_worker_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/workers/activitypub/delivery_worker_spec.rb b/spec/workers/activitypub/delivery_worker_spec.rb
index f4633731e..d39393d50 100644
--- a/spec/workers/activitypub/delivery_worker_spec.rb
+++ b/spec/workers/activitypub/delivery_worker_spec.rb
@@ -11,7 +11,7 @@ describe ActivityPub::DeliveryWorker do
   let(:payload) { 'test' }
 
   before do
-    allow_any_instance_of(Account).to receive(:remote_followers_hash).with('https://example.com/').and_return('somehash')
+    allow_any_instance_of(Account).to receive(:remote_followers_hash).with('https://example.com/api').and_return('somehash')
   end
 
   describe 'perform' do