spec/lib/upload_spec.rb in s3_website-1.4.4 vs spec/lib/upload_spec.rb in s3_website-1.4.5
- old
+ new
@@ -142,9 +142,19 @@
config['max_age'] = {'*' => 300}
subject.should be_cache_control
end
end
+ context 'the user specifies max-age as zero' do
+ let(:config) {{
+ 'max_age' => 0
+ }}
+
+ it 'includes the no-cache declaration in the cache-control metadata' do
+ subject.send(:upload_options)[:cache_control].should == 'no-cache, max-age=0'
+ end
+ end
+
describe '#max_age' do
it 'should be the universal value if one is set' do
subject.send(:max_age).should == 300
end