diff options
Diffstat (limited to 'spec/lib/gitlab/safe_request_store_spec.rb')
-rw-r--r-- | spec/lib/gitlab/safe_request_store_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/gitlab/safe_request_store_spec.rb b/spec/lib/gitlab/safe_request_store_spec.rb index c797171dbe2..bae87e43615 100644 --- a/spec/lib/gitlab/safe_request_store_spec.rb +++ b/spec/lib/gitlab/safe_request_store_spec.rb @@ -78,6 +78,12 @@ describe Gitlab::SafeRequestStore do described_class.write('foo', true) end.to change { described_class.read('foo') }.from(nil).to(true) end + + it 'does not pass the options hash to the underlying store implementation' do + expect(described_class.store).to receive(:write).with('foo', true) + + described_class.write('foo', true, expires_in: 15.seconds) + end end context 'when RequestStore is NOT active' do @@ -86,6 +92,12 @@ describe Gitlab::SafeRequestStore do described_class.write('foo', true) end.not_to change { described_class.read('foo') }.from(nil) end + + it 'does not pass the options hash to the underlying store implementation' do + expect(described_class.store).to receive(:write).with('foo', true) + + described_class.write('foo', true, expires_in: 15.seconds) + end end end |