| 516 | } |
| 517 | |
| 518 | func (s *SuiteCommit) TestMalformedHeader(c *C) { |
| 519 | encoded := &plumbing.MemoryObject{} |
| 520 | decoded := &Commit{} |
| 521 | commit := *s.Commit |
| 522 | |
| 523 | commit.PGPSignature = "\n" |
| 524 | commit.Author.Name = "\n" |
| 525 | commit.Author.Email = "\n" |
| 526 | commit.Committer.Name = "\n" |
| 527 | commit.Committer.Email = "\n" |
| 528 | |
| 529 | err := commit.Encode(encoded) |
| 530 | c.Assert(err, IsNil) |
| 531 | |
| 532 | err = decoded.Decode(encoded) |
| 533 | c.Assert(err, IsNil) |
| 534 | } |
| 535 | |
| 536 | func (s *SuiteCommit) TestEncodeWithoutSignature(c *C) { |
| 537 | // Similar to TestString since no signature |