This commit is contained in:
Baris Usakli
2018-12-05 11:22:44 -05:00
parent c0e015e1c5
commit d3c6cba33f
2 changed files with 10 additions and 1 deletions

View File

@@ -79,6 +79,15 @@ describe('Categories', function () {
});
});
it('should get all categories', function (done) {
Categories.getAllCategories(1, function (err, data) {
assert.ifError(err);
assert(Array.isArray(data));
assert.equal(data[0].cid, categoryObj.cid);
done();
});
});
it('should load a category route', function (done) {
request(nconf.get('url') + '/api/category/' + categoryObj.cid + '/test-category', { json: true }, function (err, response, body) {
assert.ifError(err);