diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-11-08 21:05:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-08 21:05:42 +0100 |
commit | 6d59dfa15d873da75c731b79367ab6b3d1b2f5a5 (patch) | |
tree | 4dda07058520c878354b95ab736ec9f6a36f4d03 /spec/controllers | |
parent | 9cfd610484541c14bcde3c368a158b9b5d2a6499 (diff) |
Optimize the process of following someone (#9220)
* Eliminate extra accounts select query from FollowService * Optimistically update follow state in web UI and hide loading bar Fix #6205 * Asynchronize NotifyService in FollowService And fix failing test * Skip Webfinger resolve routine when called from FollowService if possible If an account is ActivityPub, then webfinger re-resolving is not necessary when called from FollowService. Improve options of ResolveAccountService
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/authorize_interactions_controller_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/controllers/authorize_interactions_controller_spec.rb b/spec/controllers/authorize_interactions_controller_spec.rb index 81fd9ceb7..ce4257b68 100644 --- a/spec/controllers/authorize_interactions_controller_spec.rb +++ b/spec/controllers/authorize_interactions_controller_spec.rb @@ -99,10 +99,12 @@ describe AuthorizeInteractionsController do allow(ResolveAccountService).to receive(:new).and_return(service) allow(service).to receive(:call).with('user@hostname').and_return(target_account) + allow(service).to receive(:call).with(target_account, skip_webfinger: true).and_return(target_account) + post :create, params: { acct: 'acct:user@hostname' } - expect(service).to have_received(:call).with('user@hostname') + expect(service).to have_received(:call).with(target_account, skip_webfinger: true) expect(account.following?(target_account)).to be true expect(response).to render_template(:success) end |