Skip to content

Commit

Permalink
adding links makes the test fail
Browse files Browse the repository at this point in the history
  • Loading branch information
sly7-7 committed May 21, 2021
1 parent c03407f commit 492514b
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,13 @@ module('integration/relationships/one_to_many_test - OneToMany relationships', f

test("Adapter's findBelongsTo must not be hit when the record is included with its owner", function (assert) {
let store = this.owner.lookup('service:store');
assert.expect(1);

this.owner.register(
'adapter:message',
Adapter.extend({
findBelongsTo() {
assert.fail('We should not call adapter.findBelongsTo since the owner is already loaded');
assert.ok(false, 'We should not call adapter.findBelongsTo since the owner is already loaded');
},
})
);
Expand All @@ -110,6 +111,10 @@ module('integration/relationships/one_to_many_test - OneToMany relationships', f
},
relationships: {
messages: {
links: {
self: 'users/1/relationships/messages',
related: 'users/1/posts',
},
data: [
{
id: '2',
Expand All @@ -126,6 +131,18 @@ module('integration/relationships/one_to_many_test - OneToMany relationships', f
attributes: {
title: 'EmberFest was great',
},
relationships: {
user: {
// data: {
// id: '1',
// type: 'user',
// },
links: {
self: 'messages/1/relationships/user',
related: 'messages/1/author',
},
},
},
},
],
});
Expand Down

0 comments on commit 492514b

Please sign in to comment.