From 0a93b9ed34b09b4715b97c7f32545ffa01674a38 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Tue, 9 Dec 2025 15:53:34 +0000 Subject: [PATCH] fix for testing export of issues --- tests/integration/issue_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/issue_test.go b/tests/integration/issue_test.go index c62eac5d2d..15dd863b3d 100644 --- a/tests/integration/issue_test.go +++ b/tests/integration/issue_test.go @@ -381,7 +381,7 @@ func TestIssueListExport(t *testing.T) { _ = testNewIssue(t, session, "user2", "repo1", "Title3", "Description3") // trying to export all open issues of the given repository - req := NewRequestWithValues(t, "GET", fmt.Sprintf("/%s/%s/issues/export?%s", "user2", "repo1", "type=all&state=open")) + req := NewRequest(t, "GET", fmt.Sprintf("/%s/%s/issues/export?%s", "user2", "repo1", "type=all&state=open")) resp := session.MakeRequest(t, req, http.StatusOK) // Content-Type should be an Excel file (XLSX) @@ -391,7 +391,7 @@ func TestIssueListExport(t *testing.T) { // Content-Disposition should indicate attachment with .xlsx cd := resp.Header().Get("Content-Disposition") assert.Contains(t, cd, "attachment") - assert.True(t, strings.Contains(cd, ".xlsx")) + assert.Contains(t, cd, ".xlsx") // open bytes as XLSX with excelize data := resp.Body.Bytes()