File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,18 @@ describe("Call test endpoint", () => {
5252 && expect ( obj . hiddengames [ 0 ] ) . to . equal ( "Tic-Tac-Toe" )
5353 } )
5454
55+ it ( 'Passing host and path and an empty uri results in success with a hidden game listed' , async ( ) => {
56+ let req = new tools . APIRequest ( { host : 'api.chadkluck.net' , path : '/games/' , uri : '' } )
57+ const result = await req . send ( )
58+ const obj = JSON . parse ( result . body ) ;
59+ expect ( result . statusCode ) . to . equal ( 200 )
60+ && expect ( result . success ) . to . equal ( true )
61+ && expect ( ( typeof result . headers ) ) . to . equal ( 'object' )
62+ && expect ( result . message ) . to . equal ( "SUCCESS" )
63+ && expect ( obj . hiddengames . length ) . to . equal ( 1 )
64+ && expect ( obj . hiddengames [ 0 ] ) . to . equal ( "Tic-Tac-Toe" )
65+ } )
66+
5567 it ( 'Passing uri results in 404' , async ( ) => {
5668 let req = new tools . APIRequest ( { uri : 'https://api.chadkluck.net/games2-waf/' } )
5769 const result = await req . send ( )
You can’t perform that action at this time.
0 commit comments