diff options
| author | ezwiebel <[email protected]> | 2016-09-06 14:15:10 +1000 |
|---|---|---|
| committer | ezwiebel <[email protected]> | 2016-09-12 15:58:53 +1000 |
| commit | e00b0831aaefeceab320c8d2fdc23fffcca58168 (patch) | |
| tree | f7b8603f2b0be2c7f5077c952b324fd18c927321 /rebase_test.go | |
| parent | b2d71f4fbc4bf6d0d1e5b29e38270f4760db3f04 (diff) | |
Add RebaseOpen() service to wrapper
Diffstat (limited to 'rebase_test.go')
| -rw-r--r-- | rebase_test.go | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/rebase_test.go b/rebase_test.go index e97a1a7..745297e 100644 --- a/rebase_test.go +++ b/rebase_test.go @@ -87,8 +87,14 @@ func TestRebaseNoConflicts(t *testing.T) { defer cleanupTestRepo(t, repo) seedTestRepo(t, repo) + // Try to open existing rebase + oRebase, err := repo.RebaseOpen(nil) + if err == nil { + t.Fatal("Did not expect to find a rebase in progress") + } + // Setup a repo with 2 branches and a different tree - err := setupRepoForRebase(repo, masterCommit, branchName) + err = setupRepoForRebase(repo, masterCommit, branchName) checkFatal(t, err) // Create several commits in emile @@ -102,6 +108,14 @@ func TestRebaseNoConflicts(t *testing.T) { checkFatal(t, err) defer rebase.Free() + // Open existing rebase + oRebase, err = repo.RebaseOpen(nil) + checkFatal(t, err) + defer oRebase.Free() + if oRebase == nil { + t.Fatal("Expected to find an existing rebase in progress") + } + // Finish the rebase properly err = rebase.Finish() checkFatal(t, err) |
