summaryrefslogtreecommitdiffstats
path: root/integrations/api_issue_milestone_test.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-09-14 13:48:03 +0200
committerGitHub <noreply@github.com>2020-09-14 14:48:03 +0300
commit00a806de681088805a6f1f6632c0a411ff03c256 (patch)
treeb9035e9100c714b7cbf4201077731f7a0a44c1bb /integrations/api_issue_milestone_test.go
parent33f606ce4cf2aeb25013122cc7b9c2ce1d688289 (diff)
downloadgitea-00a806de681088805a6f1f6632c0a411ff03c256.tar.gz
gitea-00a806de681088805a6f1f6632c0a411ff03c256.zip
[API] Milestone endpoints accept names too (#12649)
* API: Milestone endpoints accept names too * add test * rename Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'integrations/api_issue_milestone_test.go')
-rw-r--r--integrations/api_issue_milestone_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/integrations/api_issue_milestone_test.go b/integrations/api_issue_milestone_test.go
index 4cc574b9eb..b9942d9a3c 100644
--- a/integrations/api_issue_milestone_test.go
+++ b/integrations/api_issue_milestone_test.go
@@ -61,6 +61,11 @@ func TestAPIIssuesMilestone(t *testing.T) {
DecodeJSON(t, resp, &apiMilestones)
assert.Len(t, apiMilestones, 4)
+ req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/milestones/%s?token=%s", owner.Name, repo.Name, apiMilestones[2].Title, token))
+ resp = session.MakeRequest(t, req, http.StatusOK)
+ DecodeJSON(t, resp, &apiMilestone)
+ assert.EqualValues(t, apiMilestones[2], apiMilestone)
+
req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/milestones?state=%s&name=%s&token=%s", owner.Name, repo.Name, "all", "milestone2", token))
resp = session.MakeRequest(t, req, http.StatusOK)
DecodeJSON(t, resp, &apiMilestones)