Skip to content

Commit

Permalink
Update unit tests to handle different current user service structure
Browse files Browse the repository at this point in the history
  • Loading branch information
markpatton committed Apr 22, 2024
1 parent 43d57e5 commit b39df3d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/acceptance/app-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module('Acceptance | application', function (hooks) {
setupMirage(hooks);

hooks.beforeEach(async function () {
await authenticateSession({ user: { id: '0' } });
await authenticateSession({ id: '0' });
});

test('Make sure app loads outside of root', async function (assert) {
Expand Down
4 changes: 1 addition & 3 deletions tests/acceptance/nih-submission-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ module('Acceptance | submission', function (hooks) {
setupMirage(hooks);

hooks.beforeEach(async function () {
await authenticateSession({
user: { id: '0' },
});
await authenticateSession({ id: '0' });
});

test('can walk through an nih submission workflow and make a submission - base case', async function (assert) {
Expand Down
4 changes: 1 addition & 3 deletions tests/acceptance/proxy-submission-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ module('Acceptance | proxy submission', function (hooks) {

this.server.create('user', attrs);

await authenticateSession({
user: { id: '0' },
});
await authenticateSession({ id: '0' });
});

test('can walk through a proxy submission workflow and make a submission – with pass account', async function (assert) {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/services/current-user-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module('Unit | Service | current-user', (hooks) => {
'@id': user.get('id'),
};

service.set('session', { data: { authenticated: { user: { id: '000' } } } });
service.set('session', { data: { authenticated: { id: '000' } } });

service.set(
'store',
Expand Down

0 comments on commit b39df3d

Please sign in to comment.