spec/grape/app/helpers/caching_spec.rb in grape-app-0.8.6 vs spec/grape/app/helpers/caching_spec.rb in grape-app-0.8.7

- old
+ new

@@ -3,11 +3,11 @@ RSpec.describe Grape::App::Helpers::Caching do include Rack::Test::Methods let(:app) { TestAPI } - it 'should handle fresh-when' do + it 'handles fresh-when' do get '/articles' expect(last_response.status).to eq(200) expect(last_response.headers).to include( 'Content-Type' => 'application/json', 'ETag' => '975ca8804565c1a569450d61090b2743', @@ -28,26 +28,26 @@ expect(last_response.status).to eq(200) get '/articles', {}, 'HTTP_IF_MODIFIED_SINCE' => 'Fri, 05 Jan 2018 11:25:20 GMT', 'HTTP_IF_NONE_MATCH' => 'other' expect(last_response.status).to eq(200) end - it 'should handle fresh_when for records that were never updated' do + it 'handles fresh_when for records that were never updated' do get '/articles/never_updated' expect(last_response.status).to eq(200) expect(last_response.headers).to include( 'Last-Modified' => 'Fri, 05 Jan 2018 11:25:00 GMT', ) end - it 'should support cache-control' do + it 'supports cache-control' do get '/articles?public=true' expect(last_response.status).to eq(200) expect(last_response.headers).to include( 'Cache-Control' => 'public', ) end - it 'should handle stale? (with cache-control)' do + it 'handles stale? (with cache-control)' do get '/articles/1' expect(last_response.status).to eq(200) expect(last_response.headers).to include( 'Cache-Control' => 'private, stale-if-error=5, a=1, b=2', 'Content-Type' => 'application/json',