aboutsummaryrefslogtreecommitdiffstats
path: root/packfile/objects_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2015-10-23 14:28:49 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2015-10-23 14:28:49 +0200
commitd0a18ccd8eea3bdabc76d6dc5420af1ea30aae9f (patch)
treed6b15f621627027810a6a0ecf33edb74ab433905 /packfile/objects_test.go
parentcf2874632223220e0445abf0a7806dc772c0b37a (diff)
downloadgo-git-d0a18ccd8eea3bdabc76d6dc5420af1ea30aae9f.tar.gz
formats/packfile: type Hash instead of strings
Diffstat (limited to 'packfile/objects_test.go')
-rw-r--r--packfile/objects_test.go50
1 files changed, 0 insertions, 50 deletions
diff --git a/packfile/objects_test.go b/packfile/objects_test.go
deleted file mode 100644
index 93c348b..0000000
--- a/packfile/objects_test.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package packfile
-
-import (
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestSignature(t *testing.T) {
- cases := map[string]Signature{
- `Foo Bar <foo@bar.com> 1257894000 +0100`: {
- Name: "Foo Bar",
- Email: "foo@bar.com",
- When: time.Unix(1257894000, 0),
- },
- `Foo Bar <> 1257894000 +0100`: {
- Name: "Foo Bar",
- Email: "",
- When: time.Unix(1257894000, 0),
- },
- ` <> 1257894000`: {
- Name: "",
- Email: "",
- When: time.Unix(1257894000, 0),
- },
- `Foo Bar <foo@bar.com>`: {
- Name: "Foo Bar",
- Email: "foo@bar.com",
- When: time.Time{},
- },
- ``: {
- Name: "",
- Email: "",
- When: time.Time{},
- },
- `<`: {
- Name: "",
- Email: "",
- When: time.Time{},
- },
- }
-
- for raw, exp := range cases {
- got := NewSignature([]byte(raw))
- assert.Equal(t, exp.Name, got.Name)
- assert.Equal(t, exp.Email, got.Email)
- assert.Equal(t, exp.When.Unix(), got.When.Unix())
- }
-}