X Tutup
Skip to content

Commit 9169c8d

Browse files
committed
Update unit tests for issue metadata
1 parent 24fcc69 commit 9169c8d

File tree

3 files changed

+28
-119
lines changed

3 files changed

+28
-119
lines changed

command/issue_test.go

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ func TestIssueView_Preview(t *testing.T) {
299299
expectedOutputs: []string{
300300
`ix of coins`,
301301
`Open • marseilles opened about 292 years ago • 9 comments`,
302-
`Participants: marseilles\n`,
303302
`bold story`,
304303
`View this issue on GitHub: https://github.com/OWNER/REPO/issues/123`,
305304
},
@@ -312,26 +311,9 @@ func TestIssueView_Preview(t *testing.T) {
312311
`ix of coins`,
313312
`Open • marseilles opened about 292 years ago • 9 comments`,
314313
`Assignees: marseilles, monaco\n`,
315-
`Labels: one, two, three\n`,
316-
`Projects: The GitHub CLI \(to do list\)\n`,
314+
`Labels: one, two, three, four, five\n`,
315+
`Projects: Project 1 \(column A\), Project 2 \(column B\), Project 3 \(column C\)\n`,
317316
`Milestone: uluru\n`,
318-
`Participants: marseilles, monaco, montpellier\n`,
319-
`bold story`,
320-
`View this issue on GitHub: https://github.com/OWNER/REPO/issues/123`,
321-
},
322-
},
323-
"Open issue with lots of metadata": {
324-
ownerRepo: "master",
325-
command: "issue view 123",
326-
fixture: "../test/fixtures/issueView_previewWithLotsOfMetadata.json",
327-
expectedOutputs: []string{
328-
`ix of coins`,
329-
`Open • marseilles opened about 292 years ago • 9 comments\n`,
330-
`Assignees: marseilles, monaco, montpellier, …\n`,
331-
`Labels: one, two, three, …\n`,
332-
`Projects: Project 1 \(column A\), Project 2 \(column B\), Project 3 \(column C\), …\n`,
333-
`Milestone: uluru\n`,
334-
`Participants: marseilles, monaco, montpellier, …\n`,
335317
`bold story`,
336318
`View this issue on GitHub: https://github.com/OWNER/REPO/issues/123`,
337319
},

test/fixtures/issueView_previewWithLotsOfMetadata.json

Lines changed: 0 additions & 95 deletions
This file was deleted.

test/fixtures/issueView_previewWithMetadata.json

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,44 @@
3232
},
3333
{
3434
"name": "three"
35+
},
36+
{
37+
"name": "four"
38+
},
39+
{
40+
"name": "five"
3541
}
3642
],
37-
"totalcount": 3
43+
"totalcount": 5
3844
},
3945
"projectcards": {
4046
"nodes": [
4147
{
4248
"project": {
43-
"name": "The GitHub CLI"
49+
"name": "Project 1"
50+
},
51+
"column": {
52+
"name": "column A"
53+
}
54+
},
55+
{
56+
"project": {
57+
"name": "Project 2"
4458
},
4559
"column": {
46-
"name": "to do list"
60+
"name": "column B"
61+
}
62+
},
63+
{
64+
"project": {
65+
"name": "Project 3"
66+
},
67+
"column": {
68+
"name": "column C"
4769
}
4870
}
4971
],
50-
"totalcount": 1
72+
"totalcount": 3
5173
},
5274
"milestone": {
5375
"title": "uluru"

0 commit comments

Comments
 (0)
X Tutup