Skip to content

Commit 37ae6bd

Browse files
committed
ci: lint
1 parent cbe89a0 commit 37ae6bd

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

  • packages/forest_admin_datasource_rpc/spec/lib/forest_admin_datasource_rpc

packages/forest_admin_datasource_rpc/spec/lib/forest_admin_datasource_rpc/collection_spec.rb

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,22 @@ module ForestAdminDatasourceRpc
77
include ForestAdminDatasourceToolkit::Components::Query::ConditionTree
88

99
describe Collection do
10-
before do
11-
logger = instance_double(Logger, log: nil)
12-
allow(ForestAdminAgent::Facades::Container).to receive_messages(logger: logger, cache: 'secret')
13-
allow(Utils::RpcClient).to receive(:new).and_return(rpc_client)
14-
end
15-
1610
let(:raw_response) do
1711
instance_double(Faraday::Response, body: {}, headers: {}, status: 200, success?: true)
1812
end
1913
let(:rpc_client) { instance_double(Utils::RpcClient, call_rpc: {}) }
20-
21-
before do
22-
allow(rpc_client).to receive(:call_rpc).with(any_args, hash_including(with_response: true)).and_return(raw_response)
23-
end
2414
let(:datasource) { Datasource.new({ uri: 'http://localhost' }, introspection) }
2515
let(:collection) { datasource.get_collection('Product') }
2616
let(:caller) { build_caller }
2717

18+
before do
19+
logger = instance_double(Logger, log: nil)
20+
allow(ForestAdminAgent::Facades::Container).to receive_messages(logger: logger, cache: 'secret')
21+
allow(Utils::RpcClient).to receive(:new).and_return(rpc_client)
22+
allow(rpc_client).to receive(:call_rpc)
23+
.with(any_args, hash_including(with_response: true)).and_return(raw_response)
24+
end
25+
2826
include_context 'with introspection'
2927

3028
context 'when initialized' do

0 commit comments

Comments
 (0)