Skip to content

Commit b27478b

Browse files
committed
Fix test
1 parent 1a8402e commit b27478b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

routers/web/repo/pull_review_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ func TestRenderConversation(t *testing.T) {
4141

4242
var preparedComment *issues_model.Comment
4343
run("prepare", func(t *testing.T, ctx *context.Context, resp *httptest.ResponseRecorder) {
44-
comment, err := pull.CreateCodeComment(ctx, pr.Issue.Poster, ctx.Repo.GitRepo, pr.Issue, 1, "content", "", false, 0, pr.HeadBranch, nil)
44+
headCommitID, err := ctx.Repo.GitRepo.GetBranchCommitID(pr.HeadBranch)
45+
assert.NoError(t, err)
46+
comment, err := pull.CreateCodeComment(ctx, pr.Issue.Poster, ctx.Repo.GitRepo, pr.Issue, 1, "content", "", false, 0, headCommitID, nil)
4547
require.NoError(t, err)
4648

4749
comment.Invalidated = true

0 commit comments

Comments
 (0)