From 00a806de681088805a6f1f6632c0a411ff03c256 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Mon, 14 Sep 2020 13:48:03 +0200 Subject: [API] Milestone endpoints accept names too (#12649) * API: Milestone endpoints accept names too * add test * rename Co-authored-by: Lauris BH --- integrations/api_issue_milestone_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'integrations/api_issue_milestone_test.go') 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) -- cgit v1.2.3