Check IF_NONE_MATCH header for directory listings

This commit is contained in:
Garret Alfert
2016-01-23 14:29:37 -05:00
parent bec9f7a6cc
commit 15196ca4b9
2 changed files with 9 additions and 1 deletions

View File

@@ -183,6 +183,13 @@ describe "App" do
last_response.headers["ETag"].must_equal "\"bla\""
end
it "responds with 304 when IF_NONE_MATCH header contains the ETag" do
header "If-None-Match", "bla"
get "/phil/food/"
last_response.status.must_equal 304
end
it "contains all items in the directory" do
get "/phil/food/"