@@ -5322,120 +5322,11 @@ describe('Division Team Standings', function() {
53225322} ) ;
53235323
53245324require . register ( "test/divisions" , function ( exports , require , module ) {
5325- describe ( 'Divisions' , function ( ) {
5326- var childDivision , newDivision , rootDivision ;
5327- newDivision = null ;
5328- rootDivision = null ;
5329- childDivision = null ;
5330- before ( function ( done ) {
5331- rootDivision = teamsnap . createDivision ( {
5332- name : 'Root Division' ,
5333- sportId : 1 ,
5334- country : 'United States' ,
5335- postalCode : 80302 ,
5336- timeZone : 'America/Denver' ,
5337- parentId : 1
5338- } ) ;
5339- return teamsnap . saveDivision ( rootDivision , function ( err , result ) {
5340- expect ( err ) . to . be [ "null" ] ;
5341- childDivision = teamsnap . createDivision ( {
5342- name : 'Child Division' ,
5343- sportId : 1 ,
5344- parentId : rootDivision . id ,
5345- country : 'United States' ,
5346- postalCode : 80302 ,
5347- timeZone : 'America/Denver' ,
5348- parentId : rootDivision . id
5349- } ) ;
5350- return teamsnap . saveDivision ( childDivision , function ( err , result ) {
5351- expect ( err ) . to . be [ "null" ] ;
5352- return done ( ) ;
5353- } ) ;
5354- } ) ;
5355- } ) ;
5356- after ( function ( done ) {
5357- return teamsnap . deleteDivision ( childDivision , function ( err , result ) {
5358- expect ( err ) . to . be [ "null" ] ;
5359- return done ( ) ;
5360- } ) ;
5361- } ) ;
5362- after ( function ( done ) {
5363- if ( newDivision ) {
5364- return teamsnap . deleteDivision ( newDivision , function ( err , result ) {
5365- expect ( err ) . to . be [ "null" ] ;
5366- return done ( ) ;
5367- } ) ;
5368- } else {
5369- return done ( ) ;
5370- }
5371- } ) ;
5372- after ( function ( done ) {
5373- return teamsnap . deleteDivision ( rootDivision , function ( err , result ) {
5374- expect ( err ) . to . be [ "null" ] ;
5375- return done ( ) ;
5376- } ) ;
5377- } ) ;
5378- it ( 'should be able to create a new division' , function ( done ) {
5379- newDivision = teamsnap . createDivision ( {
5380- name : 'New Test Division' ,
5381- sportId : 1 ,
5382- country : 'United States' ,
5383- postalCode : 80302 ,
5384- timeZone : 'America/Denver' ,
5385- parentId : rootDivision . id
5386- } ) ;
5387- return teamsnap . saveDivision ( newDivision , function ( err , result ) {
5388- expect ( err ) . to . be [ "null" ] ;
5389- return done ( ) ;
5390- } ) ;
5391- } ) ;
5392- it ( 'should be able to load all divisions' , function ( done ) {
5393- return teamsnap . loadDivisions ( function ( err , result ) {
5394- expect ( err ) . to . be [ "null" ] ;
5395- result . should . be . an ( 'array' ) ;
5396- return done ( ) ;
5397- } ) ;
5398- } ) ;
5399- it ( 'should be able to load a division' , function ( done ) {
5400- return teamsnap . loadDivision ( rootDivision . id , function ( err , result ) {
5401- expect ( err ) . to . be [ "null" ] ;
5402- result . should . be . an ( 'object' ) ;
5403- return done ( ) ;
5404- } ) ;
5405- } ) ;
5406- it ( 'should be able to delete a division' , function ( done ) {
5407- return teamsnap . deleteDivision ( newDivision , function ( err , result ) {
5408- expect ( err ) . to . be [ "null" ] ;
5409- newDivision = null ;
5410- return done ( ) ;
5411- } ) ;
5412- } ) ;
5413- it ( 'should be able to return a divisions ancestors' , function ( done ) {
5414- return teamsnap . ancestorDivisions ( childDivision . id , function ( err , result ) {
5415- expect ( err ) . to . be [ "null" ] ;
5416- result . should . be . an ( 'array' ) ;
5417- return done ( ) ;
5418- } ) ;
5419- } ) ;
5420- it ( 'should be able to return a divisions descendants' , function ( done ) {
5421- return teamsnap . descendantDivisions ( rootDivision . id , function ( err , result ) {
5422- expect ( err ) . to . be [ "null" ] ;
5423- result . should . be . an ( 'array' ) ;
5424- return done ( ) ;
5425- } ) ;
5426- } ) ;
5427- return it ( 'should be able to return a divisions children' , function ( done ) {
5428- return teamsnap . childrenDivisions ( rootDivision . id , function ( err , result ) {
5429- expect ( err ) . to . be [ "null" ] ;
5430- result . should . be . an ( 'array' ) ;
5431- return done ( ) ;
5432- } ) ;
5433- } ) ;
5434- } ) ;
5325+
54355326
54365327} ) ;
54375328
5438- require . register ( "test/eventStatistics" , function ( exports , require , module ) {
5329+ ; require . register ( "test/eventStatistics" , function ( exports , require , module ) {
54395330describe ( 'Event Statistics' , function ( ) {
54405331 return it ( 'should be able to load all event statistics for a team' , function ( done ) {
54415332 return teamsnap . loadEventStatistics ( team . id , function ( err , result ) {
0 commit comments