summaryrefslogtreecommitdiffstats
path: root/tests/integration/api_issue_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/api_issue_test.go')
-rw-r--r--tests/integration/api_issue_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/integration/api_issue_test.go b/tests/integration/api_issue_test.go
index 095ebb1773..2074bbee7c 100644
--- a/tests/integration/api_issue_test.go
+++ b/tests/integration/api_issue_test.go
@@ -33,7 +33,7 @@ func TestAPIListIssues(t *testing.T) {
link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/issues", owner.Name, repo.Name))
link.RawQuery = url.Values{"token": {token}, "state": {"all"}}.Encode()
- resp := session.MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK)
+ resp := MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK)
var apiIssues []*api.Issue
DecodeJSON(t, resp, &apiIssues)
assert.Len(t, apiIssues, unittest.GetCount(t, &issues_model.Issue{RepoID: repo.ID}))
@@ -43,7 +43,7 @@ func TestAPIListIssues(t *testing.T) {
// test milestone filter
link.RawQuery = url.Values{"token": {token}, "state": {"all"}, "type": {"all"}, "milestones": {"ignore,milestone1,3,4"}}.Encode()
- resp = session.MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK)
+ resp = MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK)
DecodeJSON(t, resp, &apiIssues)
if assert.Len(t, apiIssues, 2) {
assert.EqualValues(t, 3, apiIssues[0].Milestone.ID)
@@ -51,21 +51,21 @@ func TestAPIListIssues(t *testing.T) {
}
link.RawQuery = url.Values{"token": {token}, "state": {"all"}, "created_by": {"user2"}}.Encode()
- resp = session.MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK)
+ resp = MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK)
DecodeJSON(t, resp, &apiIssues)
if assert.Len(t, apiIssues, 1) {
assert.EqualValues(t, 5, apiIssues[0].ID)
}
link.RawQuery = url.Values{"token": {token}, "state": {"all"}, "assigned_by": {"user1"}}.Encode()
- resp = session.MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK)
+ resp = MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK)
DecodeJSON(t, resp, &apiIssues)
if assert.Len(t, apiIssues, 1) {
assert.EqualValues(t, 1, apiIssues[0].ID)
}
link.RawQuery = url.Values{"token": {token}, "state": {"all"}, "mentioned_by": {"user4"}}.Encode()
- resp = session.MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK)
+ resp = MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK)
DecodeJSON(t, resp, &apiIssues)
if assert.Len(t, apiIssues, 1) {
assert.EqualValues(t, 1, apiIssues[0].ID)
@@ -87,7 +87,7 @@ func TestAPICreateIssue(t *testing.T) {
Title: title,
Assignee: owner.Name,
})
- resp := session.MakeRequest(t, req, http.StatusCreated)
+ resp := MakeRequest(t, req, http.StatusCreated)
var apiIssue api.Issue
DecodeJSON(t, resp, &apiIssue)
assert.Equal(t, body, apiIssue.Body)
@@ -135,7 +135,7 @@ func TestAPIEditIssue(t *testing.T) {
// ToDo change more
})
- resp := session.MakeRequest(t, req, http.StatusCreated)
+ resp := MakeRequest(t, req, http.StatusCreated)
var apiIssue api.Issue
DecodeJSON(t, resp, &apiIssue)