diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-08-10 21:05:17 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-08-12 13:26:32 +0200 |
commit | 9e571827055dedb46b78c5db3d17d6913f14870b (patch) | |
tree | f5f0108afe0c9385ff6dc27664943d9f719f57ad /releaser/git_test.go | |
parent | 6027ee11082d0b9d72de1d4d1980a702be294ad2 (diff) |
tests: Convert from testify to quicktest
Diffstat (limited to 'releaser/git_test.go')
-rw-r--r-- | releaser/git_test.go | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/releaser/git_test.go b/releaser/git_test.go index f0d6fd24b..1c5f78886 100644 --- a/releaser/git_test.go +++ b/releaser/git_test.go @@ -16,19 +16,20 @@ package releaser import ( "testing" - "github.com/stretchr/testify/require" + qt "github.com/frankban/quicktest" ) func TestGitInfos(t *testing.T) { + c := qt.New(t) skipIfCI(t) infos, err := getGitInfos("v0.20", "hugo", "", false) - require.NoError(t, err) - require.True(t, len(infos) > 0) - + c.Assert(err, qt.IsNil) + c.Assert(len(infos) > 0, qt.Equals, true) } func TestIssuesRe(t *testing.T) { + c := qt.New(t) body := ` This is a commit message. @@ -41,28 +42,30 @@ See #456 issues := extractIssues(body) - require.Len(t, issues, 4) - require.Equal(t, 123, issues[0]) - require.Equal(t, 543, issues[2]) + c.Assert(len(issues), qt.Equals, 4) + c.Assert(issues[0], qt.Equals, 123) + c.Assert(issues[2], qt.Equals, 543) } func TestGitVersionTagBefore(t *testing.T) { skipIfCI(t) + c := qt.New(t) v1, err := gitVersionTagBefore("v0.18") - require.NoError(t, err) - require.Equal(t, "v0.17", v1) + c.Assert(err, qt.IsNil) + c.Assert(v1, qt.Equals, "v0.17") } func TestTagExists(t *testing.T) { skipIfCI(t) + c := qt.New(t) b1, err := tagExists("v0.18") - require.NoError(t, err) - require.True(t, b1) + c.Assert(err, qt.IsNil) + c.Assert(b1, qt.Equals, true) b2, err := tagExists("adfagdsfg") - require.NoError(t, err) - require.False(t, b2) + c.Assert(err, qt.IsNil) + c.Assert(b2, qt.Equals, false) } |