aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-09-01 20:01:36 +0800
committerGitHub <noreply@github.com>2023-09-01 12:01:36 +0000
commitf01bed2443c32b8017a8dc31ca0161bd76bf3251 (patch)
tree8fc33df0db6fa0fc374db5e09e728f9bab7589cf /tests
parente8aae43f56fedd6f7b04affd378c2c4ed2af9d78 (diff)
downloadgitea-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.go2
-rw-r--r--tests/integration/issue_test.go2
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)