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

Function TestSplitURL

bridge/github/config_test.go:12–100  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

RunMethod · 0.80
splitURLFunction · 0.70

Tested by

no test coverage detected