Skip to content

Commit 726f46a

Browse files
chore: remove dev flag from identity page (#1119)
1 parent 267295a commit 726f46a

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

app/routes/identity.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ export default class IdentityRoute extends Route {
1010
@service login;
1111
@service fastboot;
1212

13-
beforeModel(transition) {
14-
if (transition?.to?.queryParams?.dev !== 'true') {
15-
this.router.transitionTo('/page-not-found');
16-
}
17-
}
18-
1913
async model() {
2014
if (this.fastboot.isFastBoot) {
2115
return null;

tests/unit/routes/identity-test.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,6 @@ module('Unit | Route | identity', function (hooks) {
2525
assert.ok(this.route);
2626
});
2727

28-
test('beforeModel redirects to page-not-found when dev param is not true', function (assert) {
29-
const transition = {
30-
to: {
31-
queryParams: {
32-
dev: 'false',
33-
},
34-
},
35-
};
36-
37-
this.route.beforeModel(transition);
38-
assert.ok(
39-
this.route.router.transitionTo.calledWith('/page-not-found'),
40-
'should redirect to page-not-found',
41-
);
42-
});
43-
44-
test('beforeModel allows navigation when dev param is true', function (assert) {
45-
const transition = {
46-
to: {
47-
queryParams: {
48-
dev: 'true',
49-
},
50-
},
51-
};
52-
53-
this.route.beforeModel(transition);
54-
assert.notOk(this.route.router.transitionTo.called, 'should not redirect');
55-
});
56-
5728
test('model returns null in FastBoot', async function (assert) {
5829
this.route.fastboot.isFastBoot = true;
5930
const result = await this.route.model();

0 commit comments

Comments
 (0)