mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-01 00:17:43 +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
|
||||
leftLine, leftHunk, rightLine, rightHunk := ParseDiffHunkString(lof)
|
||||
hunks = append([]*HunkInfo{}, &HunkInfo{
|
||||
hunks = append(hunks, &HunkInfo{
|
||||
LeftLine: int64(leftLine),
|
||||
LeftHunk: int64(leftHunk),
|
||||
RightLine: int64(rightLine),
|
||||
|
@ -445,16 +445,6 @@ func Test_ReviewCodeComment(t *testing.T) {
|
||||
})
|
||||
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")
|
||||
comment := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{
|
||||
Type: issues_model.CommentTypeCode,
|
||||
|
Loading…
Reference in New Issue
Block a user