hasOne - test sync scope getter

This commit is contained in:
Fabien Franzen 2014-09-04 21:27:40 +02:00
parent 98a75103a1
commit e502bd4459
1 changed files with 4 additions and 0 deletions

View File

@ -850,6 +850,10 @@ describe('relations', function () {
Author.findOne(function (err, author) {
author.avatar(function (err, p) {
should.not.exist(err);
var avatar = author.avatar();
avatar.should.equal(p);
p.name.should.equal('Avatar');
p.imageableId.should.eql(author.id);
p.imageableType.should.equal('Author');