diff options
| author | Shulhan <ms@kilabit.info> | 2018-10-31 23:57:53 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2018-10-31 23:57:53 +0700 |
| commit | 0073103e650bd8a4b6ebcf64ff1683709e2e4239 (patch) | |
| tree | 0461cd8c9ce5f49d2b0d85330b0d70ec5fe47bc9 /lib/git/git_test.go | |
| parent | e8940bde01307d269269bfb760950f36b5acefa2 (diff) | |
| download | pakakeh.go-0073103e650bd8a4b6ebcf64ff1683709e2e4239.tar.xz | |
lib/git: add function to fetch and list tags
Diffstat (limited to 'lib/git/git_test.go')
| -rw-r--r-- | lib/git/git_test.go | 24 |
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 |
