From 950be998bc3d04efe5e1f7ab4b7d28245779f82b Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Fri, 8 Aug 2014 09:39:36 -0700 Subject: [PATCH] Fix the test case so that it works with other DBs --- test/relations.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/relations.test.js b/test/relations.test.js index 6f827760..d1a2003a 100644 --- a/test/relations.test.js +++ b/test/relations.test.js @@ -284,17 +284,17 @@ describe('relations', function () { Address.create({name: 'z'}, function (err, address) { patient.address(address); patient.save(function() { - verify(physician); + verify(physician, address.id); }); }); }); }); - function verify(physician) { + function verify(physician, addressId) { physician.patients({include: 'address'}, function (err, ch) { should.not.exist(err); should.exist(ch); ch.should.have.lengthOf(1); - ch[0].addressId.should.equal(1); + ch[0].addressId.should.eql(addressId); var address = ch[0].address(); should.exist(address); address.should.be.an.instanceof(Address);