@@ -66,7 +66,6 @@ describe('Project', () => {
6666 details : { } ,
6767 createdBy : 1 ,
6868 updatedBy : 1 ,
69- templateId : 1 ,
7069 lastActivityAt : 1 ,
7170 lastActivityUserId : '1' ,
7271 createdAt : '2016-06-30 00:33:07+00' ,
@@ -80,7 +79,6 @@ describe('Project', () => {
8079 details : { } ,
8180 createdBy : 1 ,
8281 updatedBy : 1 ,
83- templateId : 1 ,
8482 lastActivityAt : 1 ,
8583 lastActivityUserId : '1' ,
8684 createdAt : '2016-06-30 00:33:07+00' ,
@@ -93,7 +91,6 @@ describe('Project', () => {
9391 details : { } ,
9492 createdBy : 1 ,
9593 updatedBy : 1 ,
96- templateId : 1 ,
9794 lastActivityAt : 1 ,
9895 lastActivityUserId : '1' ,
9996 createdAt : '2016-06-30 00:33:07+00' ,
@@ -122,12 +119,6 @@ describe('Project', () => {
122119 userId : 40051332 ,
123120 createdBy : 1 ,
124121 updatedBy : 1 ,
125- } , {
126- projectId : project1 . id ,
127- role : 'member' ,
128- userId : 40051331 ,
129- createdBy : 1 ,
130- updatedBy : 1 ,
131122 } ] ) ;
132123 } ) . then ( ( ) => done ( ) ) ;
133124 } ) ;
@@ -188,84 +179,6 @@ describe('Project', () => {
188179 } ) ;
189180 } ) ;
190181
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-
269182 it ( 'should return 200 if topcoder manager user will update a project' , ( done ) => {
270183 request ( server )
271184 . patch ( `/v4/projects/${ project1 . id } ` )
0 commit comments