Skip to content

Commit

Permalink
#178 Added some more tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeijer committed Feb 25, 2015
1 parent c222141 commit 4a292b9
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion test/middleware/executor/ExecutorClient.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var requirejs = require('requirejs'),
executorClient,
server,
serverBaseUrl;

// TODO: How to specify the nedb paths for jobList and workerList?
describe('ExecutorClient', function () {
'use strict';

Expand Down Expand Up @@ -77,4 +77,25 @@ describe('ExecutorClient', function () {
});
});
});

it('getInfo for non-existing hash should return 404', function (done) {
executorClient.getInfo('87704f10a36aa4214f5b0095ba8099e729a10f46', function (err, res) {
should.equal(err,404);
done();
});
});

it('getAllInfo should return 500', function (done) {
executorClient.getAllInfo(function(err) {
should.equal(err, 500);
done();
});
});

it('getInfoByStatus SUCCESS should succeed', function (done) {
executorClient.getInfoByStatus('SUCCESS', function(err, res) {
should.equal(err, null);
done();
});
});
});

0 comments on commit 4a292b9

Please sign in to comment.