Skip to content

Commit

Permalink
Test. Closes #1700
Browse files Browse the repository at this point in the history
  • Loading branch information
Eran Hammer committed Jun 9, 2014
1 parent 8e38908 commit b013174
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions test/pack.js
Expand Up @@ -962,8 +962,21 @@ describe('Pack', function () {

it('errors on bad cache start', function (done) {

var server = new Hapi.Server(0, { cache: { } });
server
var cache = {
engine: {
start: function (callback) {

return callback(new Error('oops'));
}
}
};

var server = new Hapi.Server(0, { cache: cache });
server.start(function (err) {

expect(err.message).to.equal('oops');
done();
});
});

describe('#log', { parallel: false }, function () {
Expand Down

0 comments on commit b013174

Please sign in to comment.