Skip to content

Commit ac99baa

Browse files
committed
Merge pull request #28 from digitalsadhu/listepo/fix-referencesMany
Fix referencesMany
2 parents 8568276 + 6564f0e commit ac99baa

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: node_js
22
node_js:
3+
- "4.2"
34
- "4.1"
45
- "4.0"
56
- "0.12"

test/referencesMany.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var expect = require('chai').expect;
44
var JSONAPIComponent = require('../');
55
var app, Post, Comment, ds;
66

7-
describe.skip('loopback json api referencesMany relationships', function () {
7+
describe('loopback json api referencesMany relationships', function () {
88
beforeEach(function () {
99
app = loopback();
1010
app.set('legacyExplorer', false);
@@ -22,7 +22,7 @@ describe.skip('loopback json api referencesMany relationships', function () {
2222
comment: String
2323
});
2424
app.model(Comment);
25-
Post.referencesMany(Comment, {property: 'comments', foreignKey: 'comments'});
25+
Post.referencesMany(Comment, {property: 'comments', foreignKey: 'commentIDs'});
2626
Comment.settings.plural = 'comments';
2727

2828
app.use(loopback.rest());
@@ -92,7 +92,7 @@ describe.skip('loopback json api referencesMany relationships', function () {
9292
Post.create({
9393
title: 'my post',
9494
content: 'my post content',
95-
comments: [comment.id]
95+
commentIDs: [comment.id]
9696
}, function (err, post) {
9797
expect(err).to.equal(null);
9898
expect(post).to.be.an('object');

0 commit comments

Comments
 (0)