@@ -346,13 +346,34 @@ exports.testWritingPBXProject = {
346346
347347 test . done ( ) ;
348348 } ,
349- 'should successfully add target attribute to PBXProject TargetAttributes' : function ( test ) {
350- console . log ( project . addTargetAttribute ) ;
349+ 'should add target attribute to PBXProject TargetAttributes' : function ( test ) {
351350 project . addTargetAttribute ( 'ProvisioningStyle' , 'Manual' ) ;
351+ var output = project . writeSync ( ) ;
352+ test . equal ( output . match ( / P r o v i s i o n i n g S t y l e \s * = \s * M a n u a l / g) . length , 1 ) ;
353+
354+ test . done ( ) ;
355+ } ,
356+ 'should change target attribute at PBXProject TargetAttributes' : function ( test ) {
357+ project . addTargetAttribute ( 'ProvisioningStyle' , 'Manual' ) ;
358+ var output = project . writeSync ( ) ;
359+ test . equal ( output . match ( / P r o v i s i o n i n g S t y l e \s * = \s * M a n u a l / g) . length , 1 ) ;
360+
361+ project . addTargetAttribute ( 'ProvisioningStyle' , 'Automatic' ) ;
362+ output = project . writeSync ( ) ;
363+ test . equal ( output . match ( / P r o v i s i o n i n g S t y l e \s * = \s * M a n u a l / g) , null ) ;
364+ test . equal ( output . match ( / P r o v i s i o n i n g S t y l e \s * = \s * A u t o m a t i c / g) . length , 1 ) ;
352365
366+ test . done ( ) ;
367+ } ,
368+ 'should remove target attribute from PBXProject TargetAttributes' : function ( test ) {
369+ project . addTargetAttribute ( 'ProvisioningStyle' , 'Manual' ) ;
353370 var output = project . writeSync ( ) ;
354- console . log ( output ) ;
355371 test . equal ( output . match ( / P r o v i s i o n i n g S t y l e \s * = \s * M a n u a l / g) . length , 1 ) ;
372+
373+ project . removeTargetAttribute ( 'ProvisioningStyle' ) ;
374+ output = project . writeSync ( ) ;
375+ test . equal ( output . match ( / P r o v i s i o n i n g S t y l e \s * = \s * M a n u a l / g) , null ) ;
376+
356377 test . done ( ) ;
357378 }
358379}
0 commit comments