@@ -11,6 +11,7 @@ import testUtil from '../../tests/util';
1111const should = chai . should ( ) ;
1212
1313describe ( 'LIST organization config' , ( ) => {
14+ const orgConfigPath = '/v4/projects/metadata/orgConfig'
1415 const configs = [
1516 {
1617 id : 1 ,
@@ -40,7 +41,7 @@ describe('LIST organization config', () => {
4041 describe ( 'GET /orgConfig' , ( ) => {
4142 it ( 'should return 200 for admin' , ( done ) => {
4243 request ( server )
43- . get ( '/v4/projects/metadata/orgConfig' )
44+ . get ( ` ${ orgConfigPath } ` )
4445 . set ( {
4546 Authorization : `Bearer ${ testUtil . jwts . admin } ` ,
4647 } )
@@ -66,7 +67,7 @@ describe('LIST organization config', () => {
6667
6768 it ( 'should return 200 with filters' , ( done ) => {
6869 request ( server )
69- . get ( `/v4/projects/metadata/orgConfig ?filter=orgId%3Din%28${ configs [ 0 ] . orgId } %29%26configName=${ configs [ 0 ] . configName } ` )
70+ . get ( `${ orgConfigPath } ?filter=orgId%3Din%28${ configs [ 0 ] . orgId } %29%26configName=${ configs [ 0 ] . configName } ` )
7071 . set ( {
7172 Authorization : `Bearer ${ testUtil . jwts . admin } ` ,
7273 } )
@@ -92,13 +93,13 @@ describe('LIST organization config', () => {
9293
9394 it ( 'should return 200 even if user is not authenticated' , ( done ) => {
9495 request ( server )
95- . get ( '/v4/projects/metadata/orgConfig' )
96+ . get ( ` ${ orgConfigPath } ` )
9697 . expect ( 200 , done ) ;
9798 } ) ;
9899
99100 it ( 'should return 200 for connect admin' , ( done ) => {
100101 request ( server )
101- . get ( '/v4/projects/metadata/orgConfig' )
102+ . get ( ` ${ orgConfigPath } ` )
102103 . set ( {
103104 Authorization : `Bearer ${ testUtil . jwts . connectAdmin } ` ,
104105 } )
@@ -108,7 +109,7 @@ describe('LIST organization config', () => {
108109
109110 it ( 'should return 200 for connect manager' , ( done ) => {
110111 request ( server )
111- . get ( '/v4/projects/metadata/orgConfig' )
112+ . get ( ` ${ orgConfigPath } ` )
112113 . set ( {
113114 Authorization : `Bearer ${ testUtil . jwts . manager } ` ,
114115 } )
@@ -118,7 +119,7 @@ describe('LIST organization config', () => {
118119
119120 it ( 'should return 200 for member' , ( done ) => {
120121 request ( server )
121- . get ( '/v4/projects/metadata/orgConfig' )
122+ . get ( ` ${ orgConfigPath } ` )
122123 . set ( {
123124 Authorization : `Bearer ${ testUtil . jwts . member } ` ,
124125 } )
@@ -127,7 +128,7 @@ describe('LIST organization config', () => {
127128
128129 it ( 'should return 200 for copilot' , ( done ) => {
129130 request ( server )
130- . get ( '/v4/projects/metadata/orgConfig' )
131+ . get ( ` ${ orgConfigPath } ` )
131132 . set ( {
132133 Authorization : `Bearer ${ testUtil . jwts . copilot } ` ,
133134 } )
0 commit comments