@@ -600,6 +600,45 @@ describe('Repository', function() {
600600 } ) ) ;
601601 } ) ;
602602
603+ it ( 'should succeed on proper commit' , function ( done ) {
604+ let parentSHA = '' ;
605+ let treeSHA = '' ;
606+ remoteRepo . getRef ( 'heads/master' ) . then ( ( ref ) => {
607+ parentSHA = ref . data . object . sha ;
608+ return remoteRepo . getCommit ( parentSHA ) ;
609+ } ) . then ( ( commit ) => {
610+ treeSHA = commit . data . tree . sha ;
611+ return remoteRepo . commit ( parentSHA , treeSHA , 'is this thing on?' ) ;
612+ } ) . then ( ( commit ) => {
613+ expect ( commit . data . author ) . to . have . own ( 'name' , 'Mike de Boer' ) ;
614+ expect ( commit . data . author ) . to . have . own ( 'email' , 'mike@c9.io' ) ;
615+ done ( ) ;
616+ } ) ;
617+ } ) ;
618+
619+ it ( 'should allow commit to change author' , function ( done ) {
620+ let parentSHA = '' ;
621+ let treeSHA = '' ;
622+ remoteRepo . getRef ( 'heads/master' ) . then ( ( ref ) => {
623+ parentSHA = ref . data . object . sha ;
624+ return remoteRepo . getCommit ( parentSHA ) ;
625+ } ) . then ( ( commit ) => {
626+ treeSHA = commit . data . tree . sha ;
627+ return remoteRepo . commit ( parentSHA , treeSHA , 'Who made this commit?' , {
628+ author : {
629+ name : 'Jimothy Halpert' ,
630+ email : 'jim@dundermifflin.com' ,
631+ } ,
632+ } ) ;
633+ } ) . then ( ( commit ) => {
634+ expect ( commit . data . author ) . to . have . own ( 'name' , 'Jimothy Halpert' ) ;
635+ expect ( commit . data . author ) . to . have . own ( 'email' , 'jim@dundermifflin.com' ) ;
636+ done ( ) ;
637+ } ) . catch ( ( err ) => {
638+ throw err ;
639+ } ) ;
640+ } ) ;
641+
603642 it ( 'should create a release' , function ( done ) {
604643 const releaseDef = {
605644 name : releaseName ,
0 commit comments