summaryrefslogtreecommitdiffstats
path: root/pkg/commands/pull_request_test.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-03-02 13:08:09 +1100
committerJesse Duffield <jessedduffield@gmail.com>2019-03-02 13:39:09 +1100
commit4de31da4bee9c622d4c6b7152e4d918b79cb4a94 (patch)
treebd64b31772230132dcbeac5be7787c612ee0e53c /pkg/commands/pull_request_test.go
parent23c51ba70841ef779e7fcef9fd2a5c717835e168 (diff)
fix up tests
This fixes up some git and oscommand tests, and pulls some tests into commit_list_builder_test.go I've also made the NewDummyBlah functions public so that I didn't need to duplicate them across packages I've also given OSCommand a SetCommand() method for setting the command on the struct I've also created a file utils.go in the test package for creating convient 'CommandSwapper's, which basically enable you to assert a sequence of commands on the command line, and swap each one out for a different one to actually be executed
Diffstat (limited to 'pkg/commands/pull_request_test.go')
-rw-r--r--pkg/commands/pull_request_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/commands/pull_request_test.go b/pkg/commands/pull_request_test.go
index 774baf92e..3e997e9c5 100644
--- a/pkg/commands/pull_request_test.go
+++ b/pkg/commands/pull_request_test.go
@@ -144,7 +144,7 @@ func TestCreatePullRequest(t *testing.T) {
for _, s := range scenarios {
t.Run(s.testName, func(t *testing.T) {
- gitCommand := newDummyGitCommand()
+ gitCommand := NewDummyGitCommand()
gitCommand.OSCommand.command = s.command
gitCommand.OSCommand.Config.GetUserConfig().Set("os.openLinkCommand", "open {{link}}")
dummyPullRequest := NewPullRequest(gitCommand)