Rewrite of variable

This commit is contained in:
mdartic 2015-10-16 18:25:23 +02:00
parent 7c22db6ea7
commit ef7fe45d9c
1 changed files with 6 additions and 6 deletions

View File

@ -4835,13 +4835,13 @@ describe('relations', function () {
}); });
it('should create record on scope', function (done) { it('should create record on scope', function (done) {
Category.create({ name: 'Category A' }, function(err, catA) { Category.create({ name: 'Category A' }, function(err, cat) {
catA.jobIds.should.be.an.array; cat.jobIds.should.be.an.array;
catA.jobIds.should.have.length(0); cat.jobIds.should.have.length(0);
catA.jobs.create({ name: 'Job 2' }, function(err, p) { cat.jobs.create({ name: 'Job 2' }, function(err, p) {
should.not.exist(err); should.not.exist(err);
catA.jobIds.should.have.length(1); cat.jobIds.should.have.length(1);
catA.jobIds.should.eql([p.id]); cat.jobIds.should.eql([p.id]);
p.name.should.equal('Job 2'); p.name.should.equal('Job 2');
job2 = p; job2 = p;
done(); done();