From 752f35adcd9b370bd3300361574dd77deff5797b Mon Sep 17 00:00:00 2001 From: JakobDev Date: Fri, 3 May 2024 15:27:35 +0200 Subject: [PATCH] Fix tests --- models/repo/star_test.go | 4 +++- tests/integration/pull_create_test.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/models/repo/star_test.go b/models/repo/star_test.go index aa30087a9e..7cc5390481 100644 --- a/models/repo/star_test.go +++ b/models/repo/star_test.go @@ -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)) diff --git a/tests/integration/pull_create_test.go b/tests/integration/pull_create_test.go index 338305d950..5ad873e70e 100644 --- a/tests/integration/pull_create_test.go +++ b/tests/integration/pull_create_test.go @@ -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(),