Permalink
Browse files

Merge branch 'master' of github.com:3rd-Eden/versions

  • Loading branch information...
2 parents fd0c727 + afd5e52 commit fb780df47cf3eb0e4c4f7e5d02c6ee8cd657420e @3rd-Eden committed Mar 25, 2013
Showing with 23 additions and 1 deletion.
  1. +1 −1 README.md
  2. +22 −0 test/middleware.test.js
View
@@ -329,7 +329,7 @@ Versions also provides you with some API sugar to make configuring a bit more
human readable:
```js
-versions.path('/public').expire('10 hours').se('sync', true);
+versions.path('/public').expire('10 hours').set('sync', true);
```
The following API methods map directly to configuration (see versions.json
View
@@ -169,6 +169,8 @@ describe('version.layer() integration', function () {
});
describe('.layer(pull)', function () {
+ this.timeout(10000);
+
it('should respond with the correct headers', function (done) {
versions.app.request()
.get('/img/trusted.png')
@@ -256,6 +258,26 @@ describe('version.layer() integration', function () {
});
});
+ it('handles HEAD requests', function (done) {
+ versions.app.request()
+ .get('/id:home/img/sprite.png')
+ .end(function (get) {
+ expect(get.statusCode).to.equal(200);
+ expect(get.body).to.not.equal('');
+
+ versions.app.request()
+ .head('/id:home/img/sprite.png')
+ .end(function (head) {
+ expect(head.statusCode).to.equal(200);
+ expect(head.headers['content-length']).to.equal(get.headers['content-length']);
+ expect(head.headers['content-type']).to.equal(get.headers['content-type']);
+ expect(head.body).to.equal('');
+
+ done();
+ });
+ });
+ });
+
it('should cache pull requests in memory');
});

0 comments on commit fb780df

Please sign in to comment.