MCPcopy
hub / github.com/cli/cli / TestNewCmdDevelop

Function TestNewCmdDevelop

pkg/cmd/issue/develop/develop_test.go:23–154  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

21)
22
23func TestNewCmdDevelop(t *testing.T) {
24 // Test shared parsing of issue number / URL.
25 argparsetest.TestArgParsing(t, NewCmdDevelop)
26
27 tests := []struct {
28 name string
29 input string
30 output DevelopOptions
31 expectedBaseRepo ghrepo.Interface
32 wantStdout string
33 wantStderr string
34 wantErr bool
35 errMsg string
36 }{
37 {
38 name: "branch-repo flag",
39 input: "1 --branch-repo owner/repo",
40 output: DevelopOptions{
41 IssueNumber: 1,
42 BranchRepo: "owner/repo",
43 },
44 },
45 {
46 name: "base flag",
47 input: "1 --base feature",
48 output: DevelopOptions{
49 IssueNumber: 1,
50 BaseBranch: "feature",
51 },
52 },
53 {
54 name: "checkout flag",
55 input: "1 --checkout",
56 output: DevelopOptions{
57 IssueNumber: 1,
58 Checkout: true,
59 },
60 },
61 {
62 name: "list flag",
63 input: "1 --list",
64 output: DevelopOptions{
65 IssueNumber: 1,
66 List: true,
67 },
68 },
69 {
70 name: "name flag",
71 input: "1 --name feature",
72 output: DevelopOptions{
73 IssueNumber: 1,
74 Name: "feature",
75 },
76 },
77 {
78 name: "issue-repo flag",
79 input: "1 --issue-repo cli/cli",
80 output: DevelopOptions{

Callers

nothing calls this directly

Calls 8

TestArgParsingFunction · 0.92
TestFunction · 0.92
IsSameFunction · 0.92
NewCmdDevelopFunction · 0.85
EqualMethod · 0.80
RunMethod · 0.65
BaseRepoMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected