From 5f4c0b79c25486548b44f1bc5d65e7527a4843c4 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 24 Feb 2021 06:32:13 +0100 Subject: Change ResolveAccountService's handling of skip_webfinger (#15750) * Change ResolveAccountService's handling of skip_webfinger Change it so it never makes any webfinger query, as the name would imply. * Add tests * Change FollowService to not take an URI for target_account * Restore domain-block check in FollowService * Fix tests --- spec/controllers/api/v1/follow_requests_controller_spec.rb | 2 +- spec/controllers/api/v1/notifications_controller_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/controllers/api') diff --git a/spec/controllers/api/v1/follow_requests_controller_spec.rb b/spec/controllers/api/v1/follow_requests_controller_spec.rb index ae92a9627..1034faa32 100644 --- a/spec/controllers/api/v1/follow_requests_controller_spec.rb +++ b/spec/controllers/api/v1/follow_requests_controller_spec.rb @@ -8,7 +8,7 @@ RSpec.describe Api::V1::FollowRequestsController, type: :controller do let(:follower) { Fabricate(:account, username: 'bob') } before do - FollowService.new.call(follower, user.account.acct) + FollowService.new.call(follower, user.account) allow(controller).to receive(:doorkeeper_token) { token } end diff --git a/spec/controllers/api/v1/notifications_controller_spec.rb b/spec/controllers/api/v1/notifications_controller_spec.rb index db3f4b782..5a0b24bbf 100644 --- a/spec/controllers/api/v1/notifications_controller_spec.rb +++ b/spec/controllers/api/v1/notifications_controller_spec.rb @@ -57,7 +57,7 @@ RSpec.describe Api::V1::NotificationsController, type: :controller do @mention_from_status = mentioning_status.mentions.first @favourite = FavouriteService.new.call(other.account, first_status) @second_favourite = FavouriteService.new.call(third.account, first_status) - @follow = FollowService.new.call(other.account, 'alice') + @follow = FollowService.new.call(other.account, user.account) end describe 'with no options' do -- cgit