summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikael Elkiaer <2102306+MikaelElkiaer@users.noreply.github.com>2022-01-17 12:17:59 +0100
committerJesse Duffield <jessedduffield@gmail.com>2022-01-25 23:23:55 +1100
commit4da5795ef16e1c37441674e02d1164ef4f81cd15 (patch)
treefdbff2cc35b9ad071edd937b58277f2c6e71f4c2
parent03c9acad2650b8fb2b3e2c7eebda61ddb331ecf2 (diff)
fixed indentation by swapping spaces for tabs
-rw-r--r--pkg/commands/hosting_service/hosting_service.go2
-rw-r--r--pkg/commands/hosting_service/hosting_service_test.go40
2 files changed, 21 insertions, 21 deletions
diff --git a/pkg/commands/hosting_service/hosting_service.go b/pkg/commands/hosting_service/hosting_service.go
index e054b01b8..42c51c86b 100644
--- a/pkg/commands/hosting_service/hosting_service.go
+++ b/pkg/commands/hosting_service/hosting_service.go
@@ -4,7 +4,7 @@ import (
"fmt"
"regexp"
"strings"
- "net/url"
+ "net/url"
"github.com/go-errors/errors"
"github.com/jesseduffield/lazygit/pkg/i18n"
diff --git a/pkg/commands/hosting_service/hosting_service_test.go b/pkg/commands/hosting_service/hosting_service_test.go
index a94b2edb3..d99281194 100644
--- a/pkg/commands/hosting_service/hosting_service_test.go
+++ b/pkg/commands/hosting_service/hosting_service_test.go
@@ -220,26 +220,26 @@ func TestGetPullRequestURL(t *testing.T) {
},
expectedLoggedErrors: []string{"Unknown git service type: 'noservice'. Expected one of github, bitbucket, gitlab"},
},
- {
- testName: "Escapes reserved URL characters in from branch name",
- from: "feature/someIssue#123",
- to: "master",
- remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git",
- test: func(url string, err error) {
- assert.NoError(t, err)
- assert.Equal(t, "https://gitlab.com/me/public/repo-with-issues/merge_requests/new?merge_request[source_branch]=feature%2FsomeIssue%23123&merge_request[target_branch]=master", url)
- },
- },
- {
- testName: "Escapes reserved URL characters in to branch name",
- from: "yolo",
- to: "archive/never-ending-feature#666",
- remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git",
- test: func(url string, err error) {
- assert.NoError(t, err)
- assert.Equal(t, "https://gitlab.com/me/public/repo-with-issues/merge_requests/new?merge_request[source_branch]=yolo&merge_request[target_branch]=archive%2Fnever-ending-feature%23666", url)
- },
- },
+ {
+ testName: "Escapes reserved URL characters in from branch name",
+ from: "feature/someIssue#123",
+ to: "master",
+ remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git",
+ test: func(url string, err error) {
+ assert.NoError(t, err)
+ assert.Equal(t, "https://gitlab.com/me/public/repo-with-issues/merge_requests/new?merge_request[source_branch]=feature%2FsomeIssue%23123&merge_request[target_branch]=master", url)
+ },
+ },
+ {
+ testName: "Escapes reserved URL characters in to branch name",
+ from: "yolo",
+ to: "archive/never-ending-feature#666",
+ remoteUrl: "git@gitlab.com:me/public/repo-with-issues.git",
+ test: func(url string, err error) {
+ assert.NoError(t, err)
+ assert.Equal(t, "https://gitlab.com/me/public/repo-with-issues/merge_requests/new?merge_request[source_branch]=yolo&merge_request[target_branch]=archive%2Fnever-ending-feature%23666", url)
+ },
+ },
}
for _, s := range scenarios {