diff options
author | John <john.mccrae@progress.com> | 2023-03-31 12:36:04 -0700 |
---|---|---|
committer | John <john.mccrae@progress.com> | 2023-03-31 12:36:04 -0700 |
commit | 0fc6fd6b62580006eea8fdac2dc0edb08a7363f1 (patch) | |
tree | fa98bcafa024e74f5d640579f6bcf5d286ddbbc6 | |
parent | 57a75d391ad65c0389142a0433d67399c0deb668 (diff) | |
download | chef-0fc6fd6b62580006eea8fdac2dc0edb08a7363f1.tar.gz |
Correcting a typo in the resource and now the tests as well
Signed-off-by: John <john.mccrae@progress.com>
-rw-r--r-- | spec/unit/provider/remote_file/http_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/provider/remote_file/http_spec.rb b/spec/unit/provider/remote_file/http_spec.rb index 8eca721cd0..9a5a25253d 100644 --- a/spec/unit/provider/remote_file/http_spec.rb +++ b/spec/unit/provider/remote_file/http_spec.rb @@ -251,7 +251,7 @@ describe Chef::Provider::RemoteFile::HTTP do end context "and the response has no Date or Last-Modified header" do - let(:last_response) { { "date" => nil, "last_modified" => nil } } + let(:last_response) { { "date" => nil, "last-modified" => nil } } it "does not set an mtime in the result" do # RFC 2616 suggests that servers that do not set a Date header do not # have a reliable clock, so no use in making them deal with dates. @@ -265,19 +265,19 @@ describe Chef::Provider::RemoteFile::HTTP do context "and the response has a Last-Modified header" do let(:last_response) do # Last-Modified should be preferred to Date if both are set - { "date" => "Fri, 17 May 2013 23:23:23 GMT", "last_modified" => "Fri, 17 May 2013 11:11:11 GMT" } + { "date" => "Fri, 17 May 2013 23:23:23 GMT", "last-modified" => "Fri, 17 May 2013 11:11:11 GMT" } end it "sets the mtime to the Last-Modified time in the response" do fetcher.fetch expect(cache_control_data.etag).to be_nil - expect(cache_control_data.mtime).to eq(last_response["last_modified"]) + expect(cache_control_data.mtime).to eq(last_response["last-modified"]) end end context "and the response has a Date header but no Last-Modified header" do let(:last_response) do - { "date" => "Fri, 17 May 2013 23:23:23 GMT", "last_modified" => nil } + { "date" => "Fri, 17 May 2013 23:23:23 GMT", "last-modified" => nil } end it "sets the mtime to the Date in the response" do |