Skip to content

Commit

Permalink
Add test for Branch template.
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Kochie <superq@gmail.com>
  • Loading branch information
SuperQ committed Nov 18, 2020
1 parent 25adac2 commit 04e829a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions internal/pipe/git/git_test.go
Expand Up @@ -41,6 +41,18 @@ func TestSingleCommit(t *testing.T) {
require.Equal(t, "v0.0.1", ctx.Git.CurrentTag)
}

func TestBranch(t *testing.T) {
_, back := testlib.Mktmp(t)
defer back()
testlib.GitInit(t)
testlib.GitCheckoutBranch(t, "test-branch")
var ctx = &context.Context{
Config: config.Project{},
}
require.NoError(t, Pipe{}.Run(ctx))
require.Equal(t, "test-branch", ctx.Git.Branch)
}

func TestNoRemote(t *testing.T) {
_, back := testlib.Mktmp(t)
defer back()
Expand Down

0 comments on commit 04e829a

Please sign in to comment.