diff options
Diffstat (limited to 'test/spec_directory.rb')
-rw-r--r-- | test/spec_directory.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/spec_directory.rb b/test/spec_directory.rb index 1a97e9e5..6ba0d406 100644 --- a/test/spec_directory.rb +++ b/test/spec_directory.rb @@ -130,4 +130,12 @@ describe Rack::Directory do res = mr.get("/script-path/cgi/test+directory/test+file") res.must_be :ok? end + + it "return error when file not found for head request" do + res = Rack::MockRequest.new(Rack::Lint.new(app)). + head("/cgi/missing") + + res.must_be :not_found? + res.body.must_be :empty? + end end |