aboutsummaryrefslogtreecommitdiffstats
path: root/integrations
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-06-17 08:40:59 +0200
committerGitHub <noreply@github.com>2021-06-17 08:40:59 +0200
commit9469e14dc6eb6f2dbd312527ed83d690800a8fc2 (patch)
tree45fb4ed1cdb14ea72f80dfb2ef82226a24433ed4 /integrations
parentfdf9ab11cd3707ce882756e616955d58d78db8c9 (diff)
downloadgitea-9469e14dc6eb6f2dbd312527ed83d690800a8fc2.tar.gz
gitea-9469e14dc6eb6f2dbd312527ed83d690800a8fc2.zip
[API] Issue Search Add filter for MilestoneNames (#16173)
Diffstat (limited to 'integrations')
-rw-r--r--integrations/api_issue_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/integrations/api_issue_test.go b/integrations/api_issue_test.go
index 604e6d6381..74512cafa3 100644
--- a/integrations/api_issue_test.go
+++ b/integrations/api_issue_test.go
@@ -222,6 +222,20 @@ func TestAPISearchIssues(t *testing.T) {
resp = session.MakeRequest(t, req, http.StatusOK)
DecodeJSON(t, resp, &apiIssues)
assert.Len(t, apiIssues, 1)
+
+ query = url.Values{"milestones": {"milestone1"}, "state": {"all"}}
+ link.RawQuery = query.Encode()
+ req = NewRequest(t, "GET", link.String())
+ resp = session.MakeRequest(t, req, http.StatusOK)
+ DecodeJSON(t, resp, &apiIssues)
+ assert.Len(t, apiIssues, 1)
+
+ query = url.Values{"milestones": {"milestone1,milestone3"}, "state": {"all"}}
+ link.RawQuery = query.Encode()
+ req = NewRequest(t, "GET", link.String())
+ resp = session.MakeRequest(t, req, http.StatusOK)
+ DecodeJSON(t, resp, &apiIssues)
+ assert.Len(t, apiIssues, 2)
}
func TestAPISearchIssuesWithLabels(t *testing.T) {