spec/unit/middlewares/cache_spec.rb in locomotivecms_steam-1.7.1 vs spec/unit/middlewares/cache_spec.rb in locomotivecms_steam-1.8.0.alpha1

- old
+ new

@@ -53,25 +53,25 @@ context 'the request is a GET' do let(:response) { nil } - before { expect(cache).to receive(:read).with('40ba2b3cfde6e2f8539c9ffa02fab139').and_return(response) } + before { expect(cache).to receive(:read).with('7f3fe1e49370f63970331ec3194d4590').and_return(response) } context 'the cache is empty' do - before { expect(cache).to receive(:write).with('40ba2b3cfde6e2f8539c9ffa02fab139', Marshal.dump([200, {}, ["Hello world!"]])) } + before { expect(cache).to receive(:write).with('7f3fe1e49370f63970331ec3194d4590', 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'] end describe 'ETag' do subject { send_request[:env]['steam.cache_etag'] } - it { is_expected.to eq '40ba2b3cfde6e2f8539c9ffa02fab139' } + it { is_expected.to eq '7f3fe1e49370f63970331ec3194d4590' } end describe 'the site administrator sets a custom cache control and vary' do @@ -102,25 +102,25 @@ subject { [send_request[:code], send_request[:headers]] } context 'based on the ETag' do - let(:etag) { '40ba2b3cfde6e2f8539c9ffa02fab139' } + let(:etag) { '7f3fe1e49370f63970331ec3194d4590' } it 'returns a 304 (Not modified) without no cache headers' do expect(subject.first).to eq 304 - expect(subject.last['Cache-Control']).to eq nil + expect(subject.last['cache-control']).to eq nil end end context 'based on the Last-Modified' do let(:modified_at) { now } it 'returns a 304 (Not modified) without no cache headers' do expect(subject.first).to eq 304 - expect(subject.last['Cache-Control']).to eq nil + expect(subject.last['cache-control']).to eq nil end end end