Fix the test case

This commit is contained in:
Raymond Feng 2015-05-29 08:57:28 -07:00
parent 270fc4c247
commit c9d6071485
1 changed files with 9 additions and 4 deletions

View File

@ -455,12 +455,17 @@ describe('include', function () {
should.not.exist(err);
should.exists(result);
result.length.should.equal(3);
// Please note the order of assemblies is random
var assemblies = {};
result.forEach(function(r) {
assemblies[r.name] = r;
});
//sedan
result[0].parts().should.have.length(3);
//hatcback
result[1].parts().should.have.length(2);
assemblies.sedan.parts().should.have.length(3);
//hatchback
assemblies.hatchback.parts().should.have.length(2);
//SUV
result[2].parts().should.have.length(0);
assemblies.SUV.parts().should.have.length(0);
self.called.should.eql(3);
done();
});