Repository: remotemobprogramming/mob
Pull request #313 (2022-09-22 12:16:58)

added tests and bump module version


Patch:
diff --git a/coauthors.go b/coauthors.go
index 72b0cca..5cb331c 100644
--- a/coauthors.go
+++ b/coauthors.go
@@ -3,7 +3,7 @@ package main
 import (
 	"bufio"
 	"fmt"
-	"github.com/remotemobprogramming/mob/v3/say"
+	"github.com/remotemobprogramming/mob/v4/say"
 	"os"
 	"path"
 	"regexp"
diff --git a/go.mod b/go.mod
index 860fe75..cbe58d2 100644
--- a/go.mod
+++ b/go.mod
@@ -1,3 +1,3 @@
-module github.com/remotemobprogramming/mob/v3
+module github.com/remotemobprogramming/mob/v4
 
 go 1.15
diff --git a/mob.go b/mob.go
index 7ae7131..1c7c108 100644
--- a/mob.go
+++ b/mob.go
@@ -8,7 +8,7 @@ import (
 	"encoding/json"
 	"errors"
 	"fmt"
-	"github.com/remotemobprogramming/mob/v3/say"
+	"github.com/remotemobprogramming/mob/v4/say"
 	"io/ioutil"
 	"net/http"
 	"net/url"
diff --git a/squash_wip.go b/squash_wip.go
index f5f2fbf..dcb52db 100644
--- a/squash_wip.go
+++ b/squash_wip.go
@@ -1,7 +1,7 @@
 package main
 
 import (
-	"github.com/remotemobprogramming/mob/v3/say"
+	"github.com/remotemobprogramming/mob/v4/say"
 	"io"
 	"io/ioutil"
 	"os"


Test patch:
diff --git a/mob_test.go b/mob_test.go
index 95690cc..91f770f 100644
--- a/mob_test.go
+++ b/mob_test.go
@@ -2,7 +2,7 @@ package main
 
 import (
 	"fmt"
-	"github.com/remotemobprogramming/mob/v3/say"
+	"github.com/remotemobprogramming/mob/v4/say"
 	"io/ioutil"
 	"os"
 	"path/filepath"
@@ -616,7 +616,6 @@ func TestResetDeleteRemoteWipBranch(t *testing.T) {
 
 func TestResetCommit(t *testing.T) {
 	output, configuration := setup(t)
-
 	start(configuration)
 	createFile(t, "example.txt", "contentIrrelevant")
 	next(configuration)
@@ -631,7 +630,6 @@ func TestResetCommit(t *testing.T) {
 func TestResetDeleteRemoteWipBranchCommit(t *testing.T) {
 	_, configuration := setup(t)
 	configuration.ResetDeleteRemoteWipBranch = true
-
 	start(configuration)
 	createFile(t, "example.txt", "contentIrrelevant")
 	next(configuration)
@@ -643,6 +641,35 @@ func TestResetDeleteRemoteWipBranchCommit(t *testing.T) {
 	assertNoMobSessionBranches(t, configuration, "mob-session")
 }
 
+func TestResetCommitBranch(t *testing.T) {
+	output, configuration := setup(t)
+	configuration.WipBranchQualifier = "green"
+	start(configuration)
+	createFile(t, "example.txt", "contentIrrelevant")
+	next(configuration)
+	assertMobSessionBranches(t, configuration, "mob/master-green")
+
+	reset(configuration)
+
+	assertOutputContains(t, output, "mob reset --delete-remote-wip-branch")
+	assertMobSessionBranches(t, configuration, "mob/master-green")
+}
+
+func TestResetDeleteRemoteWipBranchCommitBranch(t *testing.T) {
+	_, configuration := setup(t)
+	configuration.WipBranchQualifier = "green"
+	configuration.ResetDeleteRemoteWipBranch = true
+	start(configuration)
+	createFile(t, "example.txt", "contentIrrelevant")
+	next(configuration)
+	assertMobSessionBranches(t, configuration, "mob/master-green")
+
+	reset(configuration)
+
+	assertOnBranch(t, "master")
+	assertNoMobSessionBranches(t, configuration, "mob/master-green")
+}
+
 func TestClean(t *testing.T) {
 	_, configuration := setup(t)
 	git("checkout", "-b", "mob-session")