summaryrefslogtreecommitdiffstats
path: root/tests/integration/api_repo_teams_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/api_repo_teams_test.go')
-rw-r--r--tests/integration/api_repo_teams_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/integration/api_repo_teams_test.go b/tests/integration/api_repo_teams_test.go
index 58ba841948..e4d054aaf8 100644
--- a/tests/integration/api_repo_teams_test.go
+++ b/tests/integration/api_repo_teams_test.go
@@ -32,7 +32,7 @@ func TestAPIRepoTeams(t *testing.T) {
// ListTeams
url := fmt.Sprintf("/api/v1/repos/%s/teams?token=%s", publicOrgRepo.FullName(), token)
req := NewRequest(t, "GET", url)
- res := session.MakeRequest(t, req, http.StatusOK)
+ res := MakeRequest(t, req, http.StatusOK)
var teams []*api.Team
DecodeJSON(t, res, &teams)
if assert.Len(t, teams, 2) {
@@ -50,19 +50,19 @@ func TestAPIRepoTeams(t *testing.T) {
// IsTeam
url = fmt.Sprintf("/api/v1/repos/%s/teams/%s?token=%s", publicOrgRepo.FullName(), "Test_Team", token)
req = NewRequest(t, "GET", url)
- res = session.MakeRequest(t, req, http.StatusOK)
+ res = MakeRequest(t, req, http.StatusOK)
var team *api.Team
DecodeJSON(t, res, &team)
assert.EqualValues(t, teams[1], team)
url = fmt.Sprintf("/api/v1/repos/%s/teams/%s?token=%s", publicOrgRepo.FullName(), "NonExistingTeam", token)
req = NewRequest(t, "GET", url)
- session.MakeRequest(t, req, http.StatusNotFound)
+ MakeRequest(t, req, http.StatusNotFound)
// AddTeam with user4
url = fmt.Sprintf("/api/v1/repos/%s/teams/%s?token=%s", publicOrgRepo.FullName(), "team1", token)
req = NewRequest(t, "PUT", url)
- session.MakeRequest(t, req, http.StatusForbidden)
+ MakeRequest(t, req, http.StatusForbidden)
// AddTeam with user2
user = unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
@@ -70,12 +70,12 @@ func TestAPIRepoTeams(t *testing.T) {
token = getTokenForLoggedInUser(t, session)
url = fmt.Sprintf("/api/v1/repos/%s/teams/%s?token=%s", publicOrgRepo.FullName(), "team1", token)
req = NewRequest(t, "PUT", url)
- session.MakeRequest(t, req, http.StatusNoContent)
- session.MakeRequest(t, req, http.StatusUnprocessableEntity) // test duplicate request
+ MakeRequest(t, req, http.StatusNoContent)
+ MakeRequest(t, req, http.StatusUnprocessableEntity) // test duplicate request
// DeleteTeam
url = fmt.Sprintf("/api/v1/repos/%s/teams/%s?token=%s", publicOrgRepo.FullName(), "team1", token)
req = NewRequest(t, "DELETE", url)
- session.MakeRequest(t, req, http.StatusNoContent)
- session.MakeRequest(t, req, http.StatusUnprocessableEntity) // test duplicate request
+ MakeRequest(t, req, http.StatusNoContent)
+ MakeRequest(t, req, http.StatusUnprocessableEntity) // test duplicate request
}