From 0fc6fd6b62580006eea8fdac2dc0edb08a7363f1 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 31 Mar 2023 12:36:04 -0700 Subject: Correcting a typo in the resource and now the tests as well Signed-off-by: John --- spec/unit/provider/remote_file/http_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec') 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 -- cgit v1.2.1