@@ -11,6 +11,7 @@ import testUtil from '../../tests/util';
11
11
const should = chai . should ( ) ;
12
12
13
13
describe ( 'LIST organization config' , ( ) => {
14
+ const orgConfigPath = '/v4/projects/metadata/orgConfig'
14
15
const configs = [
15
16
{
16
17
id : 1 ,
@@ -40,7 +41,7 @@ describe('LIST organization config', () => {
40
41
describe ( 'GET /orgConfig' , ( ) => {
41
42
it ( 'should return 200 for admin' , ( done ) => {
42
43
request ( server )
43
- . get ( '/v4/projects/metadata/orgConfig' )
44
+ . get ( ` ${ orgConfigPath } ` )
44
45
. set ( {
45
46
Authorization : `Bearer ${ testUtil . jwts . admin } ` ,
46
47
} )
@@ -66,7 +67,7 @@ describe('LIST organization config', () => {
66
67
67
68
it ( 'should return 200 with filters' , ( done ) => {
68
69
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 } ` )
70
71
. set ( {
71
72
Authorization : `Bearer ${ testUtil . jwts . admin } ` ,
72
73
} )
@@ -92,13 +93,13 @@ describe('LIST organization config', () => {
92
93
93
94
it ( 'should return 200 even if user is not authenticated' , ( done ) => {
94
95
request ( server )
95
- . get ( '/v4/projects/metadata/orgConfig' )
96
+ . get ( ` ${ orgConfigPath } ` )
96
97
. expect ( 200 , done ) ;
97
98
} ) ;
98
99
99
100
it ( 'should return 200 for connect admin' , ( done ) => {
100
101
request ( server )
101
- . get ( '/v4/projects/metadata/orgConfig' )
102
+ . get ( ` ${ orgConfigPath } ` )
102
103
. set ( {
103
104
Authorization : `Bearer ${ testUtil . jwts . connectAdmin } ` ,
104
105
} )
@@ -108,7 +109,7 @@ describe('LIST organization config', () => {
108
109
109
110
it ( 'should return 200 for connect manager' , ( done ) => {
110
111
request ( server )
111
- . get ( '/v4/projects/metadata/orgConfig' )
112
+ . get ( ` ${ orgConfigPath } ` )
112
113
. set ( {
113
114
Authorization : `Bearer ${ testUtil . jwts . manager } ` ,
114
115
} )
@@ -118,7 +119,7 @@ describe('LIST organization config', () => {
118
119
119
120
it ( 'should return 200 for member' , ( done ) => {
120
121
request ( server )
121
- . get ( '/v4/projects/metadata/orgConfig' )
122
+ . get ( ` ${ orgConfigPath } ` )
122
123
. set ( {
123
124
Authorization : `Bearer ${ testUtil . jwts . member } ` ,
124
125
} )
@@ -127,7 +128,7 @@ describe('LIST organization config', () => {
127
128
128
129
it ( 'should return 200 for copilot' , ( done ) => {
129
130
request ( server )
130
- . get ( '/v4/projects/metadata/orgConfig' )
131
+ . get ( ` ${ orgConfigPath } ` )
131
132
. set ( {
132
133
Authorization : `Bearer ${ testUtil . jwts . copilot } ` ,
133
134
} )
0 commit comments