From b39df3d4a3e2fb0208a118f9618e7831789bd60f Mon Sep 17 00:00:00 2001 From: Mark Patton Date: Mon, 15 Apr 2024 10:04:28 -0400 Subject: [PATCH] Update unit tests to handle different current user service structure --- tests/acceptance/app-test.js | 2 +- tests/acceptance/nih-submission-test.js | 4 +--- tests/acceptance/proxy-submission-test.js | 4 +--- tests/unit/services/current-user-test.js | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/acceptance/app-test.js b/tests/acceptance/app-test.js index 1fe4c387..b66c4f55 100644 --- a/tests/acceptance/app-test.js +++ b/tests/acceptance/app-test.js @@ -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) { diff --git a/tests/acceptance/nih-submission-test.js b/tests/acceptance/nih-submission-test.js index 732986fb..e278e283 100644 --- a/tests/acceptance/nih-submission-test.js +++ b/tests/acceptance/nih-submission-test.js @@ -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) { diff --git a/tests/acceptance/proxy-submission-test.js b/tests/acceptance/proxy-submission-test.js index 6a0968ad..cb0b099c 100644 --- a/tests/acceptance/proxy-submission-test.js +++ b/tests/acceptance/proxy-submission-test.js @@ -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) { diff --git a/tests/unit/services/current-user-test.js b/tests/unit/services/current-user-test.js index 3b7528de..63525075 100644 --- a/tests/unit/services/current-user-test.js +++ b/tests/unit/services/current-user-test.js @@ -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',