Skip to content

Commit

Permalink
fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
did committed Feb 28, 2020
1 parent 416097c commit 0f32f0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/unit/middlewares/cache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@

let(:response) { nil }

before { expect(cache).to receive(:read).with('2fae60bf8d7d9c0dce6cabcac8288267').and_return(response) }
before { expect(cache).to receive(:read).with('d067eb71e255c31cd3cff107c3a0c9e9').and_return(response) }

context 'the cache is empty' do

before { expect(cache).to receive(:write).with('2fae60bf8d7d9c0dce6cabcac8288267', Marshal.dump([200, {}, ["Hello world!"]])) }
before { expect(cache).to receive(:write).with('d067eb71e255c31cd3cff107c3a0c9e9', Marshal.dump([200, {}, ["Hello world!"]])) }

it 'tells the CDN to cache the page and also cache it internally' do
is_expected.to eq ['max-age=0, s-maxage=3600, public, must-revalidate', 'Accept-Language']
Expand All @@ -69,7 +69,7 @@

subject { send_request[:env]['steam.cache_etag'] }

it { is_expected.to eq '2fae60bf8d7d9c0dce6cabcac8288267' }
it { is_expected.to eq 'd067eb71e255c31cd3cff107c3a0c9e9' }

end

Expand Down Expand Up @@ -104,7 +104,7 @@

context 'based on the ETag' do

let(:etag) { '2fae60bf8d7d9c0dce6cabcac8288267' }
let(:etag) { 'd067eb71e255c31cd3cff107c3a0c9e9' }

it 'returns a 304 (Not modified) without no cache headers' do
expect(subject.first).to eq 304
Expand Down

0 comments on commit 0f32f0d

Please sign in to comment.