@@ -46,6 +46,11 @@ describe('discovery-v1', function() {
4646    username : 'batman' 
4747  } ; 
4848
49+   const  queryPayload  =  { 
50+     collection_id : 'col-guid' , 
51+     environment_id : 'env-guid' 
52+   } ; 
53+ 
4954  const  paths  =  { 
5055    environments : '/v1/environments' , 
5156    environmentinfo : '/v1/environments/env-guid' , 
@@ -842,10 +847,6 @@ describe('discovery-v1', function() {
842847          } ) ; 
843848        } ) ;  // end of _ensureFilename() 
844849        describe ( 'queryRelations()' ,  function ( )  { 
845-           const  queryParams  =  { 
846-             collection_id : 'col-guid' , 
847-             environment_id : 'env-guid' 
848-           } ; 
849850          it ( 'should check no parameters are provided' ,  function ( )  { 
850851            discovery . queryRelations ( null ,  missingParams ) ; 
851852            discovery . queryRelations ( undefined ,  missingParams ) ; 
@@ -854,7 +855,7 @@ describe('discovery-v1', function() {
854855            discovery . queryRelations ( {  collection_id : 'col-guid'  } ,  missingParams ) ; 
855856          } ) ; 
856857          it ( 'should generate a valid payload' ,  function ( )  { 
857-             const  req  =  discovery . queryRelations ( queryParams ,  noop ) ; 
858+             const  req  =  discovery . queryRelations ( queryPayload ,  noop ) ; 
858859            assert . equal ( 
859860              req . uri . href , 
860861              service . url  +  paths . queryRelations  +  '?version='  +  service . version_date 
@@ -863,10 +864,6 @@ describe('discovery-v1', function() {
863864        } ) ; 
864865
865866        describe ( 'queryEntities()' ,  function ( )  { 
866-           const  queryParams  =  { 
867-             collection_id : 'col-guid' , 
868-             environment_id : 'env-guid' 
869-           } ; 
870867          it ( 'should check no parameters are provided' ,  function ( )  { 
871868            discovery . queryEntities ( null ,  missingParams ) ; 
872869            discovery . queryEntities ( undefined ,  missingParams ) ; 
@@ -875,7 +872,7 @@ describe('discovery-v1', function() {
875872            discovery . queryEntities ( {  collection_id : 'col-guid'  } ,  missingParams ) ; 
876873          } ) ; 
877874          it ( 'should generate a valid payload' ,  function ( )  { 
878-             const  req  =  discovery . queryEntities ( queryParams ,  noop ) ; 
875+             const  req  =  discovery . queryEntities ( queryPayload ,  noop ) ; 
879876            assert . equal ( 
880877              req . uri . href , 
881878              service . url  +  paths . queryEntities  +  '?version='  +  service . version_date 
0 commit comments