@@ -46,6 +46,11 @@ describe('discovery-v1', function() {
46
46
username : 'batman'
47
47
} ;
48
48
49
+ const queryPayload = {
50
+ collection_id : 'col-guid' ,
51
+ environment_id : 'env-guid'
52
+ } ;
53
+
49
54
const paths = {
50
55
environments : '/v1/environments' ,
51
56
environmentinfo : '/v1/environments/env-guid' ,
@@ -842,10 +847,6 @@ describe('discovery-v1', function() {
842
847
} ) ;
843
848
} ) ; // end of _ensureFilename()
844
849
describe ( 'queryRelations()' , function ( ) {
845
- const queryParams = {
846
- collection_id : 'col-guid' ,
847
- environment_id : 'env-guid'
848
- } ;
849
850
it ( 'should check no parameters are provided' , function ( ) {
850
851
discovery . queryRelations ( null , missingParams ) ;
851
852
discovery . queryRelations ( undefined , missingParams ) ;
@@ -854,7 +855,7 @@ describe('discovery-v1', function() {
854
855
discovery . queryRelations ( { collection_id : 'col-guid' } , missingParams ) ;
855
856
} ) ;
856
857
it ( 'should generate a valid payload' , function ( ) {
857
- const req = discovery . queryRelations ( queryParams , noop ) ;
858
+ const req = discovery . queryRelations ( queryPayload , noop ) ;
858
859
assert . equal (
859
860
req . uri . href ,
860
861
service . url + paths . queryRelations + '?version=' + service . version_date
@@ -863,10 +864,6 @@ describe('discovery-v1', function() {
863
864
} ) ;
864
865
865
866
describe ( 'queryEntities()' , function ( ) {
866
- const queryParams = {
867
- collection_id : 'col-guid' ,
868
- environment_id : 'env-guid'
869
- } ;
870
867
it ( 'should check no parameters are provided' , function ( ) {
871
868
discovery . queryEntities ( null , missingParams ) ;
872
869
discovery . queryEntities ( undefined , missingParams ) ;
@@ -875,7 +872,7 @@ describe('discovery-v1', function() {
875
872
discovery . queryEntities ( { collection_id : 'col-guid' } , missingParams ) ;
876
873
} ) ;
877
874
it ( 'should generate a valid payload' , function ( ) {
878
- const req = discovery . queryEntities ( queryParams , noop ) ;
875
+ const req = discovery . queryEntities ( queryPayload , noop ) ;
879
876
assert . equal (
880
877
req . uri . href ,
881
878
service . url + paths . queryEntities + '?version=' + service . version_date
0 commit comments