@@ -7,11 +7,11 @@ import {
7
7
authenticateSession ,
8
8
currentSession ,
9
9
} from 'ember-simple-auth/test-support' ;
10
- import config from '../.. /config/environment' ;
10
+ import config from 'test-app /config/environment' ;
11
11
12
12
module ( 'Acceptance: Authentication' , function ( hooks ) {
13
13
setupApplicationTest ( hooks ) ;
14
- let server ;
14
+ let server : Pretender ;
15
15
16
16
hooks . afterEach ( function ( ) {
17
17
if ( server ) {
@@ -85,7 +85,7 @@ module('Acceptance: Authentication', function (hooks) {
85
85
} ) ;
86
86
87
87
await visit ( '/' ) ;
88
- await authenticateSession ( { userId : 1 , otherData : 'some-data' } ) ;
88
+ await authenticateSession ( { userId : '1' , otherData : 'some-data' } ) ;
89
89
await visit ( '/protected' ) ;
90
90
91
91
let session = currentSession ( ) ;
@@ -133,7 +133,7 @@ module('Acceptance: Authentication', function (hooks) {
133
133
'{"data":[]}' ,
134
134
] ) ;
135
135
} ) ;
136
- await authenticateSession ( { userId : 1 , otherData : 'some-data' } ) ;
136
+ await authenticateSession ( { userId : '1' , otherData : 'some-data' } ) ;
137
137
await visit ( '/engine/protected' ) ;
138
138
139
139
assert . equal ( currentURL ( ) , '/engine/protected' ) ;
@@ -150,7 +150,7 @@ module('Acceptance: Authentication', function (hooks) {
150
150
'{"data":[]}' ,
151
151
] ) ;
152
152
} ) ;
153
- await authenticateSession ( { userId : 1 , otherData : 'some-data' } ) ;
153
+ await authenticateSession ( { userId : '1' , otherData : 'some-data' } ) ;
154
154
await visit ( '/engine/protected' ) ;
155
155
await click ( '[data-test-logout-button]' ) ;
156
156
@@ -168,7 +168,7 @@ module('Acceptance: Authentication', function (hooks) {
168
168
'{"data":[]}' ,
169
169
] ) ;
170
170
} ) ;
171
- await authenticateSession ( { userId : 1 , otherData : 'some-data' } ) ;
171
+ await authenticateSession ( { userId : '1' , otherData : 'some-data' } ) ;
172
172
await visit ( '/engine/open-only' ) ;
173
173
174
174
assert . equal ( currentURL ( ) , '/' ) ;
@@ -191,7 +191,7 @@ module('Acceptance: Authentication', function (hooks) {
191
191
} ) ;
192
192
193
193
test ( 'cannot be visited when the session is authenticated' , async function ( assert ) {
194
- await authenticateSession ( ) ;
194
+ await authenticateSession ( { } ) ;
195
195
await visit ( '/login' ) ;
196
196
197
197
assert . equal ( currentURL ( ) , '/' ) ;
0 commit comments