Skip to content
This repository was archived by the owner on Oct 6, 2024. It is now read-only.

Commit aac3cdc

Browse files
committed
fix rubocop and specs
1 parent 26c8420 commit aac3cdc

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

spec/concerns/record/request_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919

2020
it 'calls correct prepare method for a Hash' do
2121
expect(subject).to receive(:prepare_option_for_include_all_request!)
22-
.with(abc: 'def').and_return('ignore')
23-
expect(subject.send(:prepare_options_for_include_all_request!, abc: 'def')).to eq(abc: 'def')
22+
.with({ abc: 'def' }).and_return('ignore')
23+
expect(subject.send(:prepare_options_for_include_all_request!, { abc: 'def' })).to eq(abc: 'def')
2424
end
2525

2626
it 'calls correct prepare method for a Hash (collection)' do
2727
expect(subject).to receive(:prepare_option_for_include_all_request!)
28-
.with(abc: 'def').and_return('ignore')
28+
.with({ abc: 'def' }).and_return('ignore')
2929
expect(subject).to receive(:prepare_option_for_include_all_request!)
30-
.with(hij: 'kel').and_return('ignore')
30+
.with({ hij: 'kel' }).and_return('ignore')
3131
expect(subject.send(:prepare_options_for_include_all_request!, [{ abc: 'def' }, { hij: 'kel' }]))
3232
.to eq([{ abc: 'def' }, { hij: 'kel' }])
3333
end

spec/record/endpoint_options_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ class Record < DHS::Record
1616

1717
it 'uses the options that are configured for an endpoint' do
1818
expect(DHC).to receive(:request)
19-
.with(
20-
cache_expires_in: 1.day,
21-
retry: 2,
22-
cache: true,
23-
url: 'backend/v2/feedbacks/1'
24-
).and_call_original
19+
.with({
20+
cache_expires_in: 1.day,
21+
retry: 2,
22+
cache: true,
23+
url: 'backend/v2/feedbacks/1'
24+
}).and_call_original
2525

2626
stub_request(:get, 'http://backend/v2/feedbacks/1').to_return(status: 200)
2727
Record.find(1)

spec/record/includes_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,12 @@ def additional_products_request(offset, amount)
214214

215215
it 'overwrites existing pagination paramters if they are already contained in a string' do
216216
expect(DHC).to receive(:request)
217-
.with(url: 'http://datastore/customers/1').and_call_original
217+
.with({ url: 'http://datastore/customers/1' }).and_call_original
218218

219219
expect(DHC).to receive(:request)
220-
.with(url: 'http://datastore/customers/1/contracts',
221-
all: true,
222-
params: { limit: 100 }).and_call_original
220+
.with({ url: 'http://datastore/customers/1/contracts',
221+
all: true,
222+
params: { limit: 100 } }).and_call_original
223223

224224
expect(DHC).to receive(:request)
225225
.with([{ url: 'http://datastore/customers/1/contracts',

0 commit comments

Comments
 (0)