var request = require('supertest');

before(function(done) {
    Student.create({firstName:'testControllerfirstname', lastName:'testControllerlastname',dateOfBirth:'2000-10-05'}).exec(function (err, myuser){
        if (err) { sails.log('Error in user creation' + err); }
         done();
    });
    
});

describe('StudentController', function() {

  describe('#create()', function() {
    it('should send 201', function (done) {
      request(sails.hooks.http.app)
        .post('/student')
        .set('Accept', 'application/json')
        .send({firstName:'kapila'})
        .send({lastName:'vithana'})
        .send({dateOfBirth:'2000-09-05'})
        .expect('Content-Type', /json/)
        .expect(201, done);
    });
  });

});