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

Function TestBug_Format

commands/bug/bug_test.go:48–129  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

46}
47
48func TestBug_Format(t *testing.T) {
49 const expOrgMode = `#+TODO: OPEN | CLOSED
50* OPEN ` + ExpHumanId + ` [` + ExpOrgModeDate + `] John Doe: this is a bug title ::
51** Last Edited: [` + ExpOrgModeDate + `]
52** Actors:
53: ` + ExpHumanId + ` John Doe
54** Participants:
55: ` + ExpHumanId + ` John Doe
56`
57
58 const expJson = `[
59 {
60 "id": "` + ExpId + `",
61 "human_id": "` + ExpHumanId + `",
62 "create_time": {
63 "timestamp": ` + ExpTimestamp + `,
64 "time": "` + ExpISO8601 + `",
65 "lamport": 2
66 },
67 "edit_time": {
68 "timestamp": ` + ExpTimestamp + `,
69 "time": "` + ExpISO8601 + `",
70 "lamport": 2
71 },
72 "status": "open",
73 "labels": null,
74 "title": "this is a bug title",
75 "actors": [
76 {
77 "id": "` + ExpId + `",
78 "human_id": "` + ExpHumanId + `",
79 "name": "John Doe",
80 "login": ""
81 }
82 ],
83 "participants": [
84 {
85 "id": "` + ExpId + `",
86 "human_id": "` + ExpHumanId + `",
87 "name": "John Doe",
88 "login": ""
89 }
90 ],
91 "author": {
92 "id": "` + ExpId + `",
93 "human_id": "` + ExpHumanId + `",
94 "name": "John Doe",
95 "login": ""
96 },
97 "comments": 1,
98 "metadata": {}
99 }
100]
101`
102
103 cases := []struct {
104 format string
105 exp string

Callers

nothing calls this directly

Calls 5

NewTestEnvAndBugFunction · 0.92
runBugFunction · 0.85
MakeExpectedRegexFunction · 0.85
RunMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected