Skip to content
Snippets Groups Projects
Commit df35d204 authored by Lucas Gabriel Lima's avatar Lucas Gabriel Lima
Browse files

add test for enrollments

parent 02569fa2
No related branches found
No related tags found
1 merge request!6Tests
Pipeline #
......@@ -16,6 +16,7 @@
"debug": "~2.0.x",
"express": "^4.13.0",
"faker": "^2.1.5",
"forever": "^0.15.2",
"js2xmlparser": "^1.0.0",
"method-override": "^2.3.3",
"monetdb": "^1.1.2",
......@@ -25,6 +26,7 @@
"license": "MIT",
"devDependencies": {
"chai": "^3.5.0",
"chai-http": "^3.0.0",
"mocha": "^2.5.3"
}
}
var assert = require('chai').assert;
var expect = require('chai').expect;
var should = require('chai').should() //actually call the function
var chai = require('chai');
var chaiHttp = require('chai-http');
var assert = chai.assert;
var expect = chai.expect;
var should = chai.should(); //actually call the function
var server = require('../libs/app');
var foo = 'bar';
it('doesn\'t do anything', function(){
assert.typeOf(foo, 'string', 'foo is a string');
});
describe('request enrollments', function(){
chai.use(chaiHttp);
it('should list enrollments', function(done){
chai.request(server)
.get('/v1/enrollments')
.end(function(err, res){
res.should.have.status(200);
res.should.be.json;
res.body.should.have.property('result');
res.body.result.should.be.a('array');
res.body.result[0].should.have.property('name');
done();
})
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment