Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
This commit is contained in:
@@ -123,7 +123,7 @@ describe AccountSearchService do
|
||||
describe 'when there is a domain but no exact match' do
|
||||
it 'follows the remote account when resolve is true' do
|
||||
service = double(call: nil)
|
||||
allow(ResolveRemoteAccountService).to receive(:new).and_return(service)
|
||||
allow(ResolveAccountService).to receive(:new).and_return(service)
|
||||
|
||||
results = subject.call('newuser@remote.com', 10, nil, resolve: true)
|
||||
expect(service).to have_received(:call).with('newuser@remote.com')
|
||||
@@ -131,7 +131,7 @@ describe AccountSearchService do
|
||||
|
||||
it 'does not follow the remote account when resolve is false' do
|
||||
service = double(call: nil)
|
||||
allow(ResolveRemoteAccountService).to receive(:new).and_return(service)
|
||||
allow(ResolveAccountService).to receive(:new).and_return(service)
|
||||
|
||||
results = subject.call('newuser@remote.com', 10, nil, resolve: false)
|
||||
expect(service).not_to have_received(:call)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ResolveRemoteAccountService do
|
||||
RSpec.describe ResolveAccountService do
|
||||
subject { described_class.new }
|
||||
|
||||
before do
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe FetchRemoteResourceService do
|
||||
describe ResolveURLService do
|
||||
subject { described_class.new }
|
||||
|
||||
describe '#call' do
|
||||
@@ -26,7 +26,7 @@ describe SearchService do
|
||||
context 'that does not find anything' do
|
||||
it 'returns the empty results' do
|
||||
service = double(call: nil)
|
||||
allow(FetchRemoteResourceService).to receive(:new).and_return(service)
|
||||
allow(ResolveURLService).to receive(:new).and_return(service)
|
||||
results = subject.call(@query, 10)
|
||||
|
||||
expect(service).to have_received(:call).with(@query)
|
||||
@@ -38,7 +38,7 @@ describe SearchService do
|
||||
it 'includes the account in the results' do
|
||||
account = Account.new
|
||||
service = double(call: account)
|
||||
allow(FetchRemoteResourceService).to receive(:new).and_return(service)
|
||||
allow(ResolveURLService).to receive(:new).and_return(service)
|
||||
|
||||
results = subject.call(@query, 10)
|
||||
expect(service).to have_received(:call).with(@query)
|
||||
@@ -50,7 +50,7 @@ describe SearchService do
|
||||
it 'includes the status in the results' do
|
||||
status = Status.new
|
||||
service = double(call: status)
|
||||
allow(FetchRemoteResourceService).to receive(:new).and_return(service)
|
||||
allow(ResolveURLService).to receive(:new).and_return(service)
|
||||
|
||||
results = subject.call(@query, 10)
|
||||
expect(service).to have_received(:call).with(@query)
|
||||
|
||||
Reference in New Issue
Block a user