diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-04-30 10:36:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-30 02:36:32 +0000 |
commit | 61b495e5ab604a26c867433e5c5ae5b07267e30f (patch) | |
tree | 064b1f0b63f2c65ef5df5d63bf4f128da0e0e112 /tests | |
parent | a3d9f0d9151dbdcd77bf68f70b8e9497da5f2d3f (diff) | |
download | gitea-61b495e5ab604a26c867433e5c5ae5b07267e30f.tar.gz gitea-61b495e5ab604a26c867433e5c5ae5b07267e30f.zip |
Fix issue label rendering in the issue popup (#30763)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/issue_test.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/integration/issue_test.go b/tests/integration/issue_test.go index 44d362d9c7..b7952b0879 100644 --- a/tests/integration/issue_test.go +++ b/tests/integration/issue_test.go @@ -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) { |