aboutsummaryrefslogtreecommitdiff
path: root/lib/git/git_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/git/git_test.go')
-rw-r--r--lib/git/git_test.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/git/git_test.go b/lib/git/git_test.go
index e52d18b5..390c24f8 100644
--- a/lib/git/git_test.go
+++ b/lib/git/git_test.go
@@ -236,6 +236,30 @@ func TestLatestVersion(t *testing.T) {
}
}
+func TestListTag(t *testing.T) {
+ cases := []struct {
+ desc string
+ exp []string
+ expErr string
+ }{{
+ desc: "With default repo",
+ exp: []string{"v0.1.0", "v0.2.0"},
+ }}
+
+ for _, c := range cases {
+ t.Log(c.desc)
+ mock.Reset(true)
+
+ got, err := ListTags(_testRepoDir)
+ if err != nil {
+ test.Assert(t, "err", c.expErr, err.Error(), true)
+ continue
+ }
+
+ test.Assert(t, "tags", c.exp, got, true)
+ }
+}
+
func TestLogRevisions(t *testing.T) {
cases := []struct {
desc string