Apply manual rubocop fixes

This commit is contained in:
Sebastian Serth
2021-05-14 11:07:11 +02:00
parent 6cbecb5b39
commit da0a682ffb
109 changed files with 431 additions and 416 deletions

View File

@ -5,6 +5,10 @@ require 'rails_helper'
describe NonceStore do
let(:nonce) { SecureRandom.hex }
before do
stub_const('Lti::MAXIMUM_SESSION_AGE', 1)
end
describe '.add' do
it 'stores a nonce in the cache' do
expect(Rails.cache).to receive(:write)
@ -28,8 +32,6 @@ describe NonceStore do
end
it 'returns false for expired nonces' do
Lti.send(:remove_const, 'MAXIMUM_SESSION_AGE')
Lti::MAXIMUM_SESSION_AGE = 1
described_class.add(nonce)
expect(described_class.has?(nonce)).to be true
sleep(Lti::MAXIMUM_SESSION_AGE)