summaryrefslogtreecommitdiff
path: root/rebase_test.go
diff options
context:
space:
mode:
authorezwiebel <[email protected]>2016-09-06 14:15:10 +1000
committerezwiebel <[email protected]>2016-09-12 15:58:53 +1000
commite00b0831aaefeceab320c8d2fdc23fffcca58168 (patch)
treef7b8603f2b0be2c7f5077c952b324fd18c927321 /rebase_test.go
parentb2d71f4fbc4bf6d0d1e5b29e38270f4760db3f04 (diff)
Add RebaseOpen() service to wrapper
Diffstat (limited to 'rebase_test.go')
-rw-r--r--rebase_test.go16
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)