Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty287 committed Nov 3, 2021
1 parent 6d9de2d commit 1665033
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions routers/web/repo/issue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,66 @@ func TestCombineLabelComments(t *testing.T) {
},
},
},
{
name: "kase 6",
beforeCombined: []*models.Comment{
{
Type: models.CommentTypeLabel,
PosterID: 1,
Content: "1",
Label: &models.Label{
Name: "kind/bug",
},
CreatedUnix: 0,
},
{
Type: models.CommentTypeLabel,
PosterID: 1,
Content: "1",
Label: &models.Label{
Name: "reviewed/confirmed",
},
CreatedUnix: 0,
},
{
Type: models.CommentTypeLabel,
PosterID: 1,
Content: "",
Label: &models.Label{
Name: "kind/bug",
},
CreatedUnix: 0,
},
{
Type: models.CommentTypeLabel,
PosterID: 1,
Content: "1",
Label: &models.Label{
Name: "kind/feature",
},
CreatedUnix: 0,
},
},
afterCombined: []*models.Comment{
{
Type: models.CommentTypeLabel,
PosterID: 1,
Content: "1",
Label: &models.Label{
Name: "kind/bug",
},
AddedLabels: []*models.Label{
{
Name: "reviewed/confirmed",
},
{
Name: "kind/feature",
},
},
CreatedUnix: 0,
},
},
},
}

for _, kase := range kases {
Expand Down

0 comments on commit 1665033

Please sign in to comment.