summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Renatus <s.renatus@x-ion.de>2014-05-17 10:02:11 +0200
committerStephan Renatus <s.renatus@x-ion.de>2014-05-17 10:02:11 +0200
commit42fe7c5a1a2adabd347d783c471cba00148b56bd (patch)
treea3304edf6f0f9fbe71ab42ae6fe77b1414cf8531
parent7c0b12efd98c2ca21e3c7cf92d22c9c22517eaa2 (diff)
downloadchef-42fe7c5a1a2adabd347d783c471cba00148b56bd.tar.gz
[CHEF-5309] add unit test for remote_file's cache_control_data
-rw-r--r--spec/unit/provider/remote_file/cache_control_data_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/provider/remote_file/cache_control_data_spec.rb b/spec/unit/provider/remote_file/cache_control_data_spec.rb
index 2ae3c41214..05fedcfa8b 100644
--- a/spec/unit/provider/remote_file/cache_control_data_spec.rb
+++ b/spec/unit/provider/remote_file/cache_control_data_spec.rb
@@ -125,6 +125,15 @@ describe Chef::Provider::RemoteFile::CacheControlData do
cache_control_data.etag.should be_nil
cache_control_data.mtime.should be_nil
end
+
+ context "and it still is valid JSON" do
+ let(:cache_json_data) { '' }
+
+ it "returns empty cache control data" do
+ cache_control_data.etag.should be_nil
+ cache_control_data.mtime.should be_nil
+ end
+ end
end
end