Debian Codegraph @

internal/command/status_test.go

raw symbols SCIP
1 package command
2
3 import (
4 "testing"
5
6 "github.com/isacikgoz/gitbatch/internal/git"
7 "github.com/stretchr/testify/require"
8 )
9
10 func TestStatusWithGit(t *testing.T) {
11 th := git.InitTestRepositoryFromLocal(t)
12 defer th.CleanUp(t)
13
14 _, err := testFile(th.RepoPath, "file")
15 require.NoError(t, err)
16
17 var tests = []struct {
18 input *git.Repository
19 }{
20 {th.Repository},
21 }
22 for _, test := range tests {
23 output, err := statusWithGit(test.input)
24 require.NoError(t, err)
25 require.NotEmpty(t, output)
26 }
27 }
28
29 func TestStatusWithGoGit(t *testing.T) {
30 th := git.InitTestRepositoryFromLocal(t)
31 defer th.CleanUp(t)
32
33 _, err := testFile(th.RepoPath, "file")
34 require.NoError(t, err)
35
36 var tests = []struct {
37 input *git.Repository
38 }{
39 {th.Repository},
40 }
41 for _, test := range tests {
42 output, err := statusWithGoGit(test.input)
43 require.NoError(t, err)
44 require.NotEmpty(t, output)
45 }
46 }