mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-22 07:13:02 -05:00
[TESTS] add TestAPIForkDifferentName (squash) do not use token= query param
See https://codeberg.org/forgejo/forgejo/commit/33439b733a
This commit is contained in:
parent
c5139a75b9
commit
d600fabdbc
1 changed files with 4 additions and 4 deletions
|
@ -222,13 +222,13 @@ func TestAPIForkDifferentName(t *testing.T) {
|
|||
|
||||
// Step 2: fork this repo with another name
|
||||
forkName := "myfork"
|
||||
req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/forks?token="+token, owner.Name, repo.Name),
|
||||
&api.CreateForkOption{Name: &forkName})
|
||||
req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/forks", owner.Name, repo.Name),
|
||||
&api.CreateForkOption{Name: &forkName}).AddTokenAuth(token)
|
||||
MakeRequest(t, req, http.StatusAccepted)
|
||||
|
||||
// Step 3: make a PR onto the original repo, it should succeed
|
||||
req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/pulls?state=all&token="+token, owner.Name, repo.Name),
|
||||
&api.CreatePullRequestOption{Head: user.Name + ":master", Base: "master", Title: "hi"})
|
||||
req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/pulls?state=all", owner.Name, repo.Name),
|
||||
&api.CreatePullRequestOption{Head: user.Name + ":master", Base: "master", Title: "hi"}).AddTokenAuth(token)
|
||||
MakeRequest(t, req, http.StatusCreated)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue