Skip to content

Commit

Permalink
Unit testing House
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles committed Nov 29, 2015
1 parent 69382e1 commit ac2d032
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/unit/controllers/HouseController.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
var request = require('supertest');
var validateHouse = require('../validator/houseValidator.js');

describe('HouseController', function() {

describe('index', function() {

it('should a valid list of userrelation', function (done) {
request(sails.hooks.http.app)
.get('/house/index?token=test')
.expect(200)
.end(function(err, res) {
for(var i = 0; i < res.body.length; i++){
validateHouse(res.body[i].house);
}
done();
});

});

});

});

0 comments on commit ac2d032

Please sign in to comment.