1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-16 07:18:37 +00:00

Fix issue label rendering in the issue popup (#30763)

This commit is contained in:
wxiaoguang
2024-04-30 10:36:32 +08:00
committed by GitHub
parent a3d9f0d915
commit 61b495e5ab
5 changed files with 36 additions and 48 deletions

View File

@@ -6,6 +6,7 @@ package integration
import (
"context"
"fmt"
"html/template"
"net/http"
"net/url"
"path"
@@ -573,10 +574,14 @@ func TestGetIssueInfo(t *testing.T) {
urlStr := fmt.Sprintf("/%s/%s/issues/%d/info", owner.Name, repo.Name, issue.Index)
req := NewRequest(t, "GET", urlStr)
resp := session.MakeRequest(t, req, http.StatusOK)
var apiIssue api.Issue
DecodeJSON(t, resp, &apiIssue)
var respStruct struct {
ConvertedIssue api.Issue
RenderedLabels template.HTML
}
DecodeJSON(t, resp, &respStruct)
assert.EqualValues(t, issue.ID, apiIssue.ID)
assert.EqualValues(t, issue.ID, respStruct.ConvertedIssue.ID)
assert.Contains(t, string(respStruct.RenderedLabels), `"labels-list"`)
}
func TestUpdateIssueDeadline(t *testing.T) {