Skip to content

Commit

Permalink
add test for directory index file support
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron McCall committed Jun 22, 2012
1 parent e8a5758 commit 2b078dd
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/fixtures/index_test/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<html>
<head><title>Index Test</title></head>
<body>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</body>
</html>
14 changes: 14 additions & 0 deletions test/staticGzipTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,20 @@ module.exports = {
}
);
},
'requesting directory returns index.html if found': function() {
assert.response(getApp(),
{
url: '/index_test/',
headers: {
'Accept-Encoding': "gzip"
}
},
function(res) {
res.statusCode.should.equal(200);
res.headers.should.have.property('content-length', '366');
}
);
},
'ensuring max age is set on resources which are passed to the default static content provider': function() {
assert.response(getApp(),
{
Expand Down

0 comments on commit 2b078dd

Please sign in to comment.