@@ -197,19 +197,6 @@ describe('Feedback Flow API', () => {
197197 expect ( response . data . ids ) . toContain ( testerId ) ;
198198 } ) ;
199199
200- test ( '80. Should remove the OAuth ID from the tester' , async ( ) => {
201- // Delete using the tester's name
202- const response = await axios . delete ( `${ API_BASE_URL } /tester/ids` , { data : { name : 'TESTER' , id : testerId } , headers : { 'Content-Type' : 'application/json' , 'Authorization' : `Bearer ${ AUTH0_TOKEN } ` } , validateStatus : ( status ) => status < 500 } ) ;
203- expect ( response . status ) . toBe ( 200 ) ;
204- expect ( response . data . success ) . toBe ( true ) ;
205- // confirm the tester no longer has the id
206- const verify = await api . post ( '/testers' , { ids : testerId } ) ;
207- expect ( verify . status ) . toBe ( 200 ) ;
208- expect ( verify . data . total ) . toBeGreaterThanOrEqual ( 0 ) ;
209- const matching = verify . data . data . find ( ( t : any ) => ( t . ids || [ ] ) . includes ( testerId ) ) ;
210- expect ( matching ) . toBeUndefined ( ) ;
211- } ) ;
212-
213200 test ( '50. Should not add duplicate OAuth ID to the tester' , async ( ) => {
214201 const response = await api . post ( '/tester/ids' , {
215202 name : 'TESTER' ,
@@ -232,6 +219,19 @@ describe('Feedback Flow API', () => {
232219 expect ( response . data . error ) . toBe ( 'Some IDs already exist in the database' ) ;
233220 } ) ;
234221
222+ test ( '80. Should remove the OAuth ID from the tester' , async ( ) => {
223+ // Delete using the tester's name
224+ const response = await axios . delete ( `${ API_BASE_URL } /tester/ids` , { data : { name : 'TESTER' , id : testerId } , headers : { 'Content-Type' : 'application/json' , 'Authorization' : `Bearer ${ AUTH0_TOKEN } ` } , validateStatus : ( status ) => status < 500 } ) ;
225+ expect ( response . status ) . toBe ( 200 ) ;
226+ expect ( response . data . success ) . toBe ( true ) ;
227+ // confirm the tester no longer has the id
228+ const verify = await api . post ( '/testers' , { ids : testerId } ) ;
229+ expect ( verify . status ) . toBe ( 200 ) ;
230+ expect ( verify . data . total ) . toBeGreaterThanOrEqual ( 0 ) ;
231+ const matching = verify . data . data . find ( ( t : any ) => ( t . ids || [ ] ) . includes ( testerId ) ) ;
232+ expect ( matching ) . toBeUndefined ( ) ;
233+ } ) ;
234+
235235 test ( '70. Should filter testers by a single id using POST /testers' , async ( ) => {
236236 // Use the authenticated user id added to TESTER in test 40
237237 const response = await api . post ( '/testers' , { ids : testerId } ) ;
0 commit comments