Skip to content

Commit df04024

Browse files
committed
hasOne() associations need to work when the FK value is 0. Pre-existing databases may've used zero as a valid entity identifier.
1 parent c506168 commit df04024

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/integration/association-hasone-zeroid.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ describe("hasOne", function() {
110110
pets[0].should.not.have.property("owner");
111111

112112
// But we should be able to see if its there
113-
pets[0].hasOwner(function(result) {
113+
pets[0].hasOwner(function(err, result) {
114114
should.equal(result, true);
115115
});
116116

117117
// ...and then get it
118-
pets[0].getOwner(function(result) {
118+
pets[0].getOwner(function(err, result) {
119119
result.firstName.should.equal("Stuey");
120120
});
121121

@@ -135,12 +135,12 @@ describe("hasOne", function() {
135135
pets[0].should.not.have.property("owner");
136136

137137
// But we should be able to see if its there
138-
pets[0].hasOwner(function(result) {
138+
pets[0].hasOwner(function(err, result) {
139139
should.equal(result, true);
140140
});
141141

142142
// ...and then get it
143-
pets[0].getOwner(function(result) {
143+
pets[0].getOwner(function(err, result) {
144144
result.firstName.should.equal("John");
145145
});
146146

0 commit comments

Comments
 (0)