@@ -66,7 +66,6 @@ describe('Project', () => {
66
66
details : { } ,
67
67
createdBy : 1 ,
68
68
updatedBy : 1 ,
69
- templateId : 1 ,
70
69
lastActivityAt : 1 ,
71
70
lastActivityUserId : '1' ,
72
71
createdAt : '2016-06-30 00:33:07+00' ,
@@ -80,7 +79,6 @@ describe('Project', () => {
80
79
details : { } ,
81
80
createdBy : 1 ,
82
81
updatedBy : 1 ,
83
- templateId : 1 ,
84
82
lastActivityAt : 1 ,
85
83
lastActivityUserId : '1' ,
86
84
createdAt : '2016-06-30 00:33:07+00' ,
@@ -93,7 +91,6 @@ describe('Project', () => {
93
91
details : { } ,
94
92
createdBy : 1 ,
95
93
updatedBy : 1 ,
96
- templateId : 1 ,
97
94
lastActivityAt : 1 ,
98
95
lastActivityUserId : '1' ,
99
96
createdAt : '2016-06-30 00:33:07+00' ,
@@ -122,12 +119,6 @@ describe('Project', () => {
122
119
userId : 40051332 ,
123
120
createdBy : 1 ,
124
121
updatedBy : 1 ,
125
- } , {
126
- projectId : project1 . id ,
127
- role : 'member' ,
128
- userId : 40051331 ,
129
- createdBy : 1 ,
130
- updatedBy : 1 ,
131
122
} ] ) ;
132
123
} ) . then ( ( ) => done ( ) ) ;
133
124
} ) ;
@@ -188,84 +179,6 @@ describe('Project', () => {
188
179
} ) ;
189
180
} ) ;
190
181
191
- it ( 'should not update the templateId for admin' , ( done ) => {
192
- request ( server )
193
- . patch ( `/v4/projects/${ project1 . id } ` )
194
- . set ( {
195
- Authorization : `Bearer ${ testUtil . jwts . admin } ` ,
196
- } )
197
- . send ( {
198
- param : {
199
- templateId : 2 ,
200
- } ,
201
- } )
202
- . expect ( 'Content-Type' , / j s o n / )
203
- . expect ( 200 )
204
- . end ( ( err , res ) => {
205
- if ( err ) {
206
- done ( err ) ;
207
- } else {
208
- const result = res . body . result ;
209
- result . success . should . be . true ;
210
- result . status . should . equal ( 200 ) ;
211
- result . content . templateId . should . equal ( project1 . templateId ) ;
212
- done ( ) ;
213
- }
214
- } ) ;
215
- } ) ;
216
-
217
- it ( 'should not update the templateId for manager' , ( done ) => {
218
- request ( server )
219
- . patch ( `/v4/projects/${ project1 . id } ` )
220
- . set ( {
221
- Authorization : `Bearer ${ testUtil . jwts . manager } ` ,
222
- } )
223
- . send ( {
224
- param : {
225
- templateId : 2 ,
226
- } ,
227
- } )
228
- . expect ( 'Content-Type' , / j s o n / )
229
- . expect ( 200 )
230
- . end ( ( err , res ) => {
231
- if ( err ) {
232
- done ( err ) ;
233
- } else {
234
- const result = res . body . result ;
235
- result . success . should . be . true ;
236
- result . status . should . equal ( 200 ) ;
237
- result . content . templateId . should . equal ( project1 . templateId ) ;
238
- done ( ) ;
239
- }
240
- } ) ;
241
- } ) ;
242
-
243
- it ( 'should not update the templateId for user' , ( done ) => {
244
- request ( server )
245
- . patch ( `/v4/projects/${ project1 . id } ` )
246
- . set ( {
247
- Authorization : `Bearer ${ testUtil . jwts . member } ` ,
248
- } )
249
- . send ( {
250
- param : {
251
- templateId : 2 ,
252
- } ,
253
- } )
254
- . expect ( 'Content-Type' , / j s o n / )
255
- . expect ( 200 )
256
- . end ( ( err , res ) => {
257
- if ( err ) {
258
- done ( err ) ;
259
- } else {
260
- const result = res . body . result ;
261
- result . success . should . be . true ;
262
- result . status . should . equal ( 200 ) ;
263
- result . content . templateId . should . equal ( project1 . templateId ) ;
264
- done ( ) ;
265
- }
266
- } ) ;
267
- } ) ;
268
-
269
182
it ( 'should return 200 if topcoder manager user will update a project' , ( done ) => {
270
183
request ( server )
271
184
. patch ( `/v4/projects/${ project1 . id } ` )
0 commit comments