@@ -288,7 +288,7 @@ describe("/requests OOO", function () {
288288 it ( "should return all requests" , function ( done ) {
289289 chai
290290 . request ( app )
291- . get ( "/requests?dev=true " )
291+ . get ( "/requests" )
292292 . end ( function ( err , res ) {
293293 expect ( res ) . to . have . status ( 200 ) ;
294294 expect ( res . body . data ) . to . have . lengthOf ( 2 ) ;
@@ -304,7 +304,7 @@ describe("/requests OOO", function () {
304304 it ( "should return all requests by specific user" , function ( done ) {
305305 chai
306306 . request ( app )
307- . get ( `/requests?dev=true& requestedBy=${ userData [ 16 ] . username } ` )
307+ . get ( `/requests?requestedBy=${ userData [ 16 ] . username } ` )
308308 . end ( function ( err , res ) {
309309 expect ( res ) . to . have . status ( 200 ) ;
310310 expect ( res . body . data . every ( ( request : any ) => request . requestedBy === testUserId ) ) ;
@@ -315,7 +315,7 @@ describe("/requests OOO", function () {
315315 it ( "should return all requests by specific user and state" , function ( done ) {
316316 chai
317317 . request ( app )
318- . get ( `/requests?dev=true& state=APPROVED&requestedBy=${ userData [ 16 ] . username } ` )
318+ . get ( `/requests?state=APPROVED&requestedBy=${ userData [ 16 ] . username } ` )
319319 . end ( function ( err , res ) {
320320 expect ( res ) . to . have . status ( 200 ) ;
321321 expect ( res . body . data . every ( ( e : any ) => e . state === "APPROVED" ) ) ;
@@ -327,7 +327,7 @@ describe("/requests OOO", function () {
327327 it ( "should return request of type OOO" , function ( done ) {
328328 chai
329329 . request ( app )
330- . get ( "/requests?dev=true& type=OOO" )
330+ . get ( "/requests?type=OOO" )
331331 . end ( function ( err , res ) {
332332 expect ( res ) . to . have . status ( 200 ) ;
333333 expect ( res . body . data . every ( ( e : any ) => e . type === "OOO" ) ) ;
@@ -338,7 +338,7 @@ describe("/requests OOO", function () {
338338 it ( "should return empty array is no data is found, for specific state and user" , function ( done ) {
339339 chai
340340 . request ( app )
341- . get ( "/requests?dev=true& requestedBy=testUser2&state=APPROVED" )
341+ . get ( "/requests?requestedBy=testUser2&state=APPROVED" )
342342 . end ( function ( err , res ) {
343343 expect ( res ) . to . have . status ( 204 ) ;
344344 done ( ) ;
@@ -348,7 +348,7 @@ describe("/requests OOO", function () {
348348 it ( "should return empty array is no data is found" , function ( done ) {
349349 chai
350350 . request ( app )
351- . get ( "/requests?dev=true& requestedBy=testUserRandom" )
351+ . get ( "/requests?requestedBy=testUserRandom" )
352352 . end ( function ( err , res ) {
353353 expect ( res ) . to . have . status ( 204 ) ;
354354 done ( ) ;
@@ -358,7 +358,7 @@ describe("/requests OOO", function () {
358358 it ( "should throw error if request id doesn't match" , function ( done ) {
359359 chai
360360 . request ( app )
361- . get ( "/requests?dev=true& id=ramdonId1" )
361+ . get ( "/requests?id=ramdonId1" )
362362 . end ( function ( err , res ) {
363363 expect ( res ) . to . have . status ( 204 ) ;
364364 done ( ) ;
@@ -368,7 +368,7 @@ describe("/requests OOO", function () {
368368 it ( "should return error if not a valid state is passed" , function ( done ) {
369369 chai
370370 . request ( app )
371- . get ( "/requests?dev=true& state=ACTIVE" )
371+ . get ( "/requests?state=ACTIVE" )
372372 . end ( function ( err , res ) {
373373 expect ( res ) . to . have . status ( 400 ) ;
374374 expect ( res . body . error ) . to . equal ( "Bad Request" ) ;
@@ -380,7 +380,7 @@ describe("/requests OOO", function () {
380380 it ( "should return error if not a valid type is passed" , function ( done ) {
381381 chai
382382 . request ( app )
383- . get ( "/requests?dev=true& type=RANDOM" )
383+ . get ( "/requests?type=RANDOM" )
384384 . end ( function ( err , res ) {
385385 expect ( res ) . to . have . status ( 400 ) ;
386386 expect ( res . body . error ) . to . equal ( "Bad Request" ) ;
0 commit comments