Skip to content

Commit 03c8aae

Browse files
committed
added tests and bump module version
1 parent cb0d5c3 commit 03c8aae

File tree

5 files changed

+36
-5
lines changed

5 files changed

+36
-5
lines changed

coauthors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"bufio"
55
"fmt"
6-
"github.com/remotemobprogramming/mob/v3/say"
6+
"github.com/remotemobprogramming/mob/v4/say"
77
"os"
88
"path"
99
"regexp"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module github.com/remotemobprogramming/mob/v3
1+
module github.com/remotemobprogramming/mob/v4
22

33
go 1.15

mob.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"encoding/json"
99
"errors"
1010
"fmt"
11-
"github.com/remotemobprogramming/mob/v3/say"
11+
"github.com/remotemobprogramming/mob/v4/say"
1212
"io/ioutil"
1313
"net/http"
1414
"net/url"

mob_test.go

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package main
22

33
import (
44
"fmt"
5-
"github.com/remotemobprogramming/mob/v3/say"
5+
"github.com/remotemobprogramming/mob/v4/say"
66
"io/ioutil"
77
"os"
88
"path/filepath"
@@ -643,6 +643,37 @@ func TestResetDeleteRemoteWipBranchCommit(t *testing.T) {
643643
assertNoMobSessionBranches(t, configuration, "mob-session")
644644
}
645645

646+
func TestResetCommitBranch(t *testing.T) {
647+
output, configuration := setup(t)
648+
configuration.WipBranchQualifier = "green"
649+
650+
start(configuration)
651+
createFile(t, "example.txt", "contentIrrelevant")
652+
next(configuration)
653+
assertMobSessionBranches(t, configuration, "mob/master-green")
654+
655+
reset(configuration)
656+
657+
assertOutputContains(t, output, "mob reset --delete-remote-wip-branch")
658+
assertMobSessionBranches(t, configuration, "mob/master-green")
659+
}
660+
661+
func TestResetDeleteRemoteWipBranchCommitBranch(t *testing.T) {
662+
_, configuration := setup(t)
663+
configuration.WipBranchQualifier = "green"
664+
configuration.ResetDeleteRemoteWipBranch = true
665+
666+
start(configuration)
667+
createFile(t, "example.txt", "contentIrrelevant")
668+
next(configuration)
669+
assertMobSessionBranches(t, configuration, "mob/master-green")
670+
671+
reset(configuration)
672+
673+
assertOnBranch(t, "master")
674+
assertNoMobSessionBranches(t, configuration, "mob/master-green")
675+
}
676+
646677
func TestClean(t *testing.T) {
647678
_, configuration := setup(t)
648679
git("checkout", "-b", "mob-session")

squash_wip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package main
22

33
import (
4-
"github.com/remotemobprogramming/mob/v3/say"
4+
"github.com/remotemobprogramming/mob/v4/say"
55
"io"
66
"io/ioutil"
77
"os"

0 commit comments

Comments
 (0)