@@ -17,7 +17,7 @@ var helpers = require('./helpers'),
1717 treeUtils = require ( 'components/utils' ) . treeUtils ,
1818 _ = require ( 'lodash' ) ;
1919
20- describe ( 'yostreams ' , function ( ) {
20+ describe ( 'streams ' , function ( ) {
2121
2222 var user = testData . users [ 0 ] ,
2323 initialRootStreamId = testData . streams [ 0 ] . id ,
@@ -282,6 +282,21 @@ describe('yostreams', function () {
282282 ) ;
283283 } ) ;
284284
285+ // Test added to verify fix of issue#29
286+ it ( 'must return an error if the given predefined stream\'s parentId ' +
287+ 'is the empty string ""' , function ( done ) {
288+ var data = {
289+ name : 'zero-length parentId string Stream' ,
290+ parentId : ''
291+ } ;
292+ request . post ( basePath ) . send ( data ) . end ( function ( res ) {
293+ validation . checkError ( res , {
294+ status : 400 ,
295+ id : ErrorIds . InvalidParametersFormat
296+ } , done ) ;
297+ } ) ;
298+ } ) ;
299+
285300 it ( 'must slugify the new stream\'s predefined id' , function ( done ) {
286301 var data = {
287302 id : 'pas encodé de bleu!' ,
@@ -340,21 +355,6 @@ describe('yostreams', function () {
340355 } ) ;
341356 } ) ;
342357
343- // Test added to verify fix of issue#29
344- it ( 'must return an error if the given predefined stream\'s parentId ' +
345- 'is the empty string ""' , function ( done ) {
346- var data = {
347- name : 'zero-length parentId string Stream' ,
348- parentId : ''
349- } ;
350- request . post ( basePath ) . send ( data ) . end ( function ( res ) {
351- validation . checkError ( res , {
352- status : 400 ,
353- id : ErrorIds . InvalidParametersFormat
354- } , done ) ;
355- } ) ;
356- } ) ;
357-
358358 } ) ;
359359
360360 describe ( 'PUT /<id>' , function ( ) {
0 commit comments