spec/grape/dsl/inside_route_spec.rb in grape-1.4.0 vs spec/grape/dsl/inside_route_spec.rb in grape-1.5.0
- old
+ new
@@ -349,10 +349,16 @@
subject.stream file_path
expect(subject.header['Cache-Control']).to eq 'no-cache'
end
+ it 'does not change Cache-Control header' do
+ subject.stream
+
+ expect(subject.header['Cache-Control']).to eq 'cache'
+ end
+
it 'sets Content-Length header to nil' do
subject.stream file_path
expect(subject.header['Content-Length']).to eq nil
end
@@ -417,9 +423,10 @@
end
end
it 'returns default' do
expect(subject.stream).to be nil
+ expect(subject.header['Cache-Control']).to eq nil
end
end
describe '#route' do
before do