mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-05 19:08:55 +00:00
Fix test
This commit is contained in:
parent
cbd73a59cc
commit
1556911468
@ -385,7 +385,7 @@ func GetAffectedHunksForTwoCommitsSpecialFile(ctx context.Context, repoPath, old
|
|||||||
}
|
}
|
||||||
// Parse the hunk header
|
// Parse the hunk header
|
||||||
leftLine, leftHunk, rightLine, rightHunk := ParseDiffHunkString(lof)
|
leftLine, leftHunk, rightLine, rightHunk := ParseDiffHunkString(lof)
|
||||||
hunks = append([]*HunkInfo{}, &HunkInfo{
|
hunks = append(hunks, &HunkInfo{
|
||||||
LeftLine: int64(leftLine),
|
LeftLine: int64(leftLine),
|
||||||
LeftHunk: int64(leftHunk),
|
LeftHunk: int64(leftHunk),
|
||||||
RightLine: int64(rightLine),
|
RightLine: int64(rightLine),
|
||||||
|
@ -445,16 +445,6 @@ func Test_ReviewCodeComment(t *testing.T) {
|
|||||||
})
|
})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
diffContent, _, err := git.NewCommand("diff").AddDynamicArguments(pr.MergeBase, pr.GetGitHeadRefName()).RunStdString(
|
|
||||||
t.Context(), &git.RunOpts{
|
|
||||||
Dir: repo.RepoPath(),
|
|
||||||
},
|
|
||||||
)
|
|
||||||
assert.NoError(t, err)
|
|
||||||
fmt.Println("=======")
|
|
||||||
fmt.Println(diffContent)
|
|
||||||
fmt.Println("=======")
|
|
||||||
|
|
||||||
session := loginUser(t, "user2")
|
session := loginUser(t, "user2")
|
||||||
comment := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{
|
comment := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{
|
||||||
Type: issues_model.CommentTypeCode,
|
Type: issues_model.CommentTypeCode,
|
||||||
|
Loading…
Reference in New Issue
Block a user