Skip to content

Commit

Permalink
Increased code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
dgofman committed Feb 10, 2015
1 parent 42e71f1 commit 6659fe0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/mocha/service-rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ describe('Testing REST API\'s', function () {
});
});

it('should test error 404', function(done) {
indigo.service.init({
host:'localhost',
port:80
}).get('/firststep/REST', params, function(err, result, req, res) {
assert.equal(res.statusCode, 404);
done();
});
});

it('should test ECONNRESET error', function(done) {
indigo.service.init({
host:'localhost',
Expand Down
6 changes: 6 additions & 0 deletions test/unittest/indigo.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ describe('UnitTests Indigo APIs', function () {
assert.equal(indigo.getNewURL(req, null, '/foo'), '/foo');
done();
});

it('should test libs module(s)', function (done) {
var errorHandler = require('../../libs/errorHandler');
assert.equal(errorHandler, indigo.libs('errorHandler'));
done();
});
});

function fixPath(path) {
Expand Down

0 comments on commit 6659fe0

Please sign in to comment.