diff --git a/app/routes/identity.js b/app/routes/identity.js index 3c77d86d..da885fc7 100644 --- a/app/routes/identity.js +++ b/app/routes/identity.js @@ -10,12 +10,6 @@ export default class IdentityRoute extends Route { @service login; @service fastboot; - beforeModel(transition) { - if (transition?.to?.queryParams?.dev !== 'true') { - this.router.transitionTo('/page-not-found'); - } - } - async model() { if (this.fastboot.isFastBoot) { return null; diff --git a/tests/unit/routes/identity-test.js b/tests/unit/routes/identity-test.js index 4d983844..82865e22 100644 --- a/tests/unit/routes/identity-test.js +++ b/tests/unit/routes/identity-test.js @@ -25,35 +25,6 @@ module('Unit | Route | identity', function (hooks) { assert.ok(this.route); }); - test('beforeModel redirects to page-not-found when dev param is not true', function (assert) { - const transition = { - to: { - queryParams: { - dev: 'false', - }, - }, - }; - - this.route.beforeModel(transition); - assert.ok( - this.route.router.transitionTo.calledWith('/page-not-found'), - 'should redirect to page-not-found', - ); - }); - - test('beforeModel allows navigation when dev param is true', function (assert) { - const transition = { - to: { - queryParams: { - dev: 'true', - }, - }, - }; - - this.route.beforeModel(transition); - assert.notOk(this.route.router.transitionTo.called, 'should not redirect'); - }); - test('model returns null in FastBoot', async function (assert) { this.route.fastboot.isFastBoot = true; const result = await this.route.model();