Skip to content

Commit d909a8b

Browse files
committed
Changes hasOne required tests to define an association field
1 parent 34b2957 commit d909a8b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test/integration/association-hasone-required.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ describe("hasOne", function() {
1616
name : String
1717
});
1818
Person.hasOne('parent', Person, {
19-
required : required
19+
required : required,
20+
field : 'parentId'
2021
});
2122

2223
return helper.dropSync(Person, done);
@@ -35,8 +36,8 @@ describe("hasOne", function() {
3536

3637
it("should not accept empty association", function (done) {
3738
var John = new Person({
38-
name : "John",
39-
parent_id : null
39+
name : "John",
40+
parentId : null
4041
});
4142
John.save(function (err) {
4243
should.exist(err);
@@ -46,8 +47,8 @@ describe("hasOne", function() {
4647

4748
it("should accept association", function (done) {
4849
var John = new Person({
49-
name : "John",
50-
parent_id : 1
50+
name : "John",
51+
parentId : 1
5152
});
5253
John.save(function (err) {
5354
should.not.exist(err);

0 commit comments

Comments
 (0)