@@ -2800,9 +2800,10 @@ describe('Project API', function () {
28002800 response . statusCode . should . eqls ( 200 )
28012801
28022802 const json = response . json ( )
2803- json . settings . env [ 5 ] . should . have . property ( 'name' , 'hidden_var' )
2804- json . settings . env [ 5 ] . should . have . property ( 'value' , '' )
2805- json . settings . env [ 5 ] . should . have . property ( 'hidden' , true )
2803+ const hiddenVar = json . settings . env . find ( envVar => envVar . name === 'hidden_var' )
2804+ should . exist ( hiddenVar )
2805+ hiddenVar . should . have . property ( 'value' , '' )
2806+ hiddenVar . should . have . property ( 'hidden' , true )
28062807 } )
28072808 it ( 'should store hidden env vars' , async ( ) => {
28082809 const projectSettings = await TestObjects . project1 . getSetting ( 'settings' )
@@ -2823,9 +2824,10 @@ describe('Project API', function () {
28232824 } )
28242825 const json = response . json ( )
28252826
2826- json . settings . env [ 5 ] . should . have . property ( 'name' , 'hidden_var' )
2827- json . settings . env [ 5 ] . should . have . property ( 'value' , '' )
2828- json . settings . env [ 5 ] . should . have . property ( 'hidden' , true )
2827+ const hiddenVar = json . settings . env . find ( envVar => envVar . name === 'hidden_var' )
2828+ should . exist ( hiddenVar )
2829+ hiddenVar . should . have . property ( 'value' , '' )
2830+ hiddenVar . should . have . property ( 'hidden' , true )
28292831
28302832 const updatedProjectSettings = await TestObjects . project1 . getSetting ( 'settings' )
28312833 updatedProjectSettings . env [ 0 ] . should . have . property ( 'name' , 'hidden_var' )
0 commit comments