polymorphic hasMany - test sync scope getter

This commit is contained in:
Fabien Franzen 2014-09-04 21:29:21 +02:00
parent e502bd4459
commit 80b71438a7
1 changed files with 4 additions and 0 deletions

View File

@ -983,6 +983,10 @@ describe('relations', function () {
Author.findOne(function (err, author) { Author.findOne(function (err, author) {
author.pictures(function (err, pics) { author.pictures(function (err, pics) {
should.not.exist(err); should.not.exist(err);
var pictures = author.pictures();
pictures.should.eql(pics);
pics.should.have.length(1); pics.should.have.length(1);
pics[0].name.should.equal('Author Pic'); pics[0].name.should.equal('Author Pic');
done(); done();