diff options
author | ThibG <thib@sitedethib.com> | 2020-12-26 23:52:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-26 23:52:46 +0100 |
commit | f1f96ebf02e96d21d84c52825cbac623b66488f8 (patch) | |
tree | b0185cd71c95891a5aa04f859db0e213d66f32f3 /spec/workers | |
parent | 4580129c987371b656a8ab19feba09fb98f9fac1 (diff) |
Fix being able to import more than allowed number of follows (#15384)
* Fix being able to import more than allowed number of follows Without this commit, if someone tries importing a second list of accounts to follow before the first one has been processed, this will queue imports for the two whole lists, even if they exceed the account's allowed number of outgoing follows. This commit changes it so the individual queued imports aren't exempt from the follow limit check (they remain exempt from the rate-limiting check though). * Catch validation errors to not re-queue failed follows Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/refollow_worker_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/workers/refollow_worker_spec.rb b/spec/workers/refollow_worker_spec.rb index 6b4c04291..df6731b64 100644 --- a/spec/workers/refollow_worker_spec.rb +++ b/spec/workers/refollow_worker_spec.rb @@ -23,8 +23,8 @@ describe RefollowWorker do result = subject.perform(account.id) expect(result).to be_nil - expect(service).to have_received(:call).with(alice, account, reblogs: true, notify: false) - expect(service).to have_received(:call).with(bob, account, reblogs: false, notify: false) + expect(service).to have_received(:call).with(alice, account, reblogs: true, notify: false, bypass_limit: true) + expect(service).to have_received(:call).with(bob, account, reblogs: false, notify: false, bypass_limit: true) end end end |