MCPcopy Index your code
hub / github.com/git-bug/git-bug / TestProjectPath

Function TestProjectPath

bridge/gitlab/config_test.go:9–90  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestProjectPath(t *testing.T) {
10 type args struct {
11 url string
12 }
13 type want struct {
14 path string
15 err error
16 }
17 tests := []struct {
18 name string
19 args args
20 want want
21 }{
22 {
23 name: "default url",
24 args: args{
25 url: "https://gitlab.com/git-bug/git-bug",
26 },
27 want: want{
28 path: "git-bug/git-bug",
29 err: nil,
30 },
31 },
32 {
33 name: "multiple sub groups",
34 args: args{
35 url: "https://gitlab.com/git-bug/group/subgroup/git-bug",
36 },
37 want: want{
38 path: "git-bug/group/subgroup/git-bug",
39 err: nil,
40 },
41 },
42 {
43 name: "default url with git extension",
44 args: args{
45 url: "https://gitlab.com/git-bug/git-bug.git",
46 },
47 want: want{
48 path: "git-bug/git-bug",
49 err: nil,
50 },
51 },
52 {
53 name: "url with git protocol",
54 args: args{
55 url: "git://gitlab.com/git-bug/git-bug.git",
56 },
57 want: want{
58 path: "git-bug/git-bug",
59 err: nil,
60 },
61 },
62 {
63 name: "ssh url",
64 args: args{
65 url: "git@gitlab.com/git-bug/git-bug.git",
66 },

Callers

nothing calls this directly

Calls 2

getProjectPathFunction · 0.85
RunMethod · 0.80

Tested by

no test coverage detected