| 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 TestMerge(t *testing.T) { |
| 11 | th := git.InitTestRepositoryFromLocal(t) |
| 12 | defer th.CleanUp(t) |
| 13 | |
| 14 | opts := &MergeOptions{ |
| 15 | BranchName: th.Repository.State.Branch.Upstream.Name, |
| 16 | } |
| 17 | var tests = []struct { |
| 18 | inp1 *git.Repository |
| 19 | inp2 *MergeOptions |
| 20 | }{ |
| 21 | {th.Repository, opts}, |
| 22 | } |
| 23 | for _, test := range tests { |
| 24 | err := Merge(test.inp1, test.inp2) |
| 25 | require.NoError(t, err) |
| 26 | } |
| 27 | } |