diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-09-01 20:01:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-01 12:01:36 +0000 |
commit | f01bed2443c32b8017a8dc31ca0161bd76bf3251 (patch) | |
tree | 8fc33df0db6fa0fc374db5e09e728f9bab7589cf /tests | |
parent | e8aae43f56fedd6f7b04affd378c2c4ed2af9d78 (diff) | |
download | gitea-f01bed2443c32b8017a8dc31ca0161bd76bf3251.tar.gz gitea-f01bed2443c32b8017a8dc31ca0161bd76bf3251.zip |
Avoid double-unescaping of form value (#26853)
1. The old `prepareQueryArg` did double-unescaping of form value.
2. By the way, remove the unnecessary `ctx.Flash = ...` in
`MockContext`.
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/api_issue_test.go | 2 | ||||
-rw-r--r-- | tests/integration/issue_test.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/api_issue_test.go b/tests/integration/api_issue_test.go index 5f4c1e6a47..5d4b9725dd 100644 --- a/tests/integration/api_issue_test.go +++ b/tests/integration/api_issue_test.go @@ -234,7 +234,7 @@ func TestAPISearchIssues(t *testing.T) { DecodeJSON(t, resp, &apiIssues) assert.Len(t, apiIssues, expectedIssueCount) - since := "2000-01-01T00%3A50%3A01%2B00%3A00" // 946687801 + since := "2000-01-01T00:50:01+00:00" // 946687801 before := time.Unix(999307200, 0).Format(time.RFC3339) query.Add("since", since) query.Add("before", before) diff --git a/tests/integration/issue_test.go b/tests/integration/issue_test.go index 58577a37ff..560f569513 100644 --- a/tests/integration/issue_test.go +++ b/tests/integration/issue_test.go @@ -368,7 +368,7 @@ func TestSearchIssues(t *testing.T) { DecodeJSON(t, resp, &apiIssues) assert.Len(t, apiIssues, expectedIssueCount) - since := "2000-01-01T00%3A50%3A01%2B00%3A00" // 946687801 + since := "2000-01-01T00:50:01+00:00" // 946687801 before := time.Unix(999307200, 0).Format(time.RFC3339) query := url.Values{} query.Add("since", since) |