Skip to content

Commit

Permalink
mirage/crate-owner-invitation: Include invitee in users list
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed Aug 28, 2021
1 parent 297ff76 commit e7980cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mirage/serializers/crate-owner-invitation.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import BaseSerializer from './application';

export default BaseSerializer.extend({
// eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
include: ['inviter'],
include: ['inviter', 'invitee'],

getHashForResource() {
let [hash, addToIncludes] = BaseSerializer.prototype.getHashForResource.apply(this, arguments);
Expand Down
7 changes: 7 additions & 0 deletions tests/mirage/me/crate-owner-invitations/list-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ module('Mirage | GET /api/v1/me/crate_owner_invitations', function (hooks) {
name: 'wycats',
url: 'https://github.com/wycats',
},
{
avatar: user.avatar,
id: Number(user.id),
login: user.login,
name: user.name,
url: user.url,
},
],
});
});
Expand Down

0 comments on commit e7980cc

Please sign in to comment.