forked from forgejo/forgejo
Use more specific test methods (#24265)
Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
parent
ac384c4e1d
commit
f1173d6879
41 changed files with 117 additions and 117 deletions
|
@ -49,7 +49,7 @@ func TestEmptyRepoAddFile(t *testing.T) {
|
|||
req := NewRequest(t, "GET", "/user30/empty/_new/"+setting.Repository.DefaultBranch)
|
||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
doc := NewHTMLParser(t, resp.Body).Find(`input[name="commit_choice"]`)
|
||||
assert.Equal(t, "", doc.AttrOr("checked", "_no_"))
|
||||
assert.Empty(t, doc.AttrOr("checked", "_no_"))
|
||||
req = NewRequestWithValues(t, "POST", "/user30/empty/_new/"+setting.Repository.DefaultBranch, map[string]string{
|
||||
"_csrf": GetCSRF(t, session, "/user/settings"),
|
||||
"commit_choice": "direct",
|
||||
|
@ -76,7 +76,7 @@ func TestEmptyRepoUploadFile(t *testing.T) {
|
|||
req := NewRequest(t, "GET", "/user30/empty/_new/"+setting.Repository.DefaultBranch)
|
||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
doc := NewHTMLParser(t, resp.Body).Find(`input[name="commit_choice"]`)
|
||||
assert.Equal(t, "", doc.AttrOr("checked", "_no_"))
|
||||
assert.Empty(t, doc.AttrOr("checked", "_no_"))
|
||||
|
||||
body := &bytes.Buffer{}
|
||||
mpForm := multipart.NewWriter(body)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue