aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-03-16 21:59:02 +0800
committerGitHub <noreply@github.com>2024-03-16 13:59:02 +0000
commitcb78648ad91a9ed0acd0640c2e7b1f580290999a (patch)
tree717201e8e0e50a22f1adbb247b4332357a5ca4cf
parentf9b4efd42c17d7f75b689142b17575a478fe903c (diff)
downloadgitea-cb78648ad91a9ed0acd0640c2e7b1f580290999a.tar.gz
gitea-cb78648ad91a9ed0acd0640c2e7b1f580290999a.zip
Fix wrong test for TestPullView_CodeOwner (#29838)
It's weird the previous test was PASS.
-rw-r--r--tests/integration/pull_review_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/integration/pull_review_test.go b/tests/integration/pull_review_test.go
index 7166a740ab..459aa5a58b 100644
--- a/tests/integration/pull_review_test.go
+++ b/tests/integration/pull_review_test.go
@@ -119,7 +119,7 @@ func TestPullView_CodeOwner(t *testing.T) {
user5 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 5})
forkedRepo, err := repo_service.ForkRepository(db.DefaultContext, user2, user5, repo_service.ForkRepoOptions{
BaseRepo: repo,
- Name: "test_codeowner_fork",
+ Name: "test_codeowner",
})
assert.NoError(t, err)
@@ -137,9 +137,9 @@ func TestPullView_CodeOwner(t *testing.T) {
assert.NoError(t, err)
session := loginUser(t, "user5")
- testPullCreate(t, session, "user5", "test_codeowner_fork", false, forkedRepo.DefaultBranch, "codeowner-basebranch-forked", "Test Pull Request2")
+ testPullCreate(t, session, "user5", "test_codeowner", true, forkedRepo.DefaultBranch, "codeowner-basebranch-forked", "Test Pull Request2")
- pr := unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{BaseRepoID: repo.ID, HeadBranch: "codeowner-basebranch-forked"})
+ pr := unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{BaseRepoID: forkedRepo.ID, HeadBranch: "codeowner-basebranch-forked"})
unittest.AssertExistsIf(t, false, &issues_model.Review{IssueID: pr.IssueID, Type: issues_model.ReviewTypeRequest, ReviewerID: 8})
})
})