Skip to content

Commit

Permalink
added tests and bump module version
Browse files Browse the repository at this point in the history
  • Loading branch information
hollesse committed Sep 22, 2022
1 parent cb0d5c3 commit 03c8aae
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 5 deletions.
2 changes: 1 addition & 1 deletion coauthors.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"bufio"
"fmt"
"github.com/remotemobprogramming/mob/v3/say"
"github.com/remotemobprogramming/mob/v4/say"
"os"
"path"
"regexp"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/remotemobprogramming/mob/v3
module github.com/remotemobprogramming/mob/v4

go 1.15
2 changes: 1 addition & 1 deletion mob.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
33 changes: 32 additions & 1 deletion mob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -643,6 +643,37 @@ 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")
Expand Down
2 changes: 1 addition & 1 deletion squash_wip.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/remotemobprogramming/mob/v3/say"
"github.com/remotemobprogramming/mob/v4/say"
"io"
"io/ioutil"
"os"
Expand Down

0 comments on commit 03c8aae

Please sign in to comment.