Fix tests

This commit is contained in:
JakobDev 2024-05-03 15:27:35 +02:00
parent dd01e85ce7
commit 752f35adcd
No known key found for this signature in database
GPG key ID: 39DEF62C3ED6DC4C
2 changed files with 4 additions and 2 deletions

View file

@ -75,7 +75,9 @@ func TestUnstarRepo(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 2})
assert.True(t, repo_model.IsStaring(db.DefaultContext, user.ID, repo.ID))
assert.NoError(t, repo_model.StarRepo(db.DefaultContext, user.ID, repo.ID, false))

View file

@ -61,7 +61,7 @@ func testPullCreate(t *testing.T, session *TestSession, user, repo string, toSel
// Submit the form for creating the pull
htmlDoc = NewHTMLParser(t, resp.Body)
link, exists = htmlDoc.doc.Find("form.ui.form").Attr("action")
link, exists = htmlDoc.doc.Find("form.ui.form#new-issue").Attr("action")
assert.True(t, exists, "The template has changed")
req = NewRequestWithValues(t, "POST", link, map[string]string{
"_csrf": htmlDoc.GetCSRF(),