Skip to content

Commit a16cf04

Browse files
committed
fix test
1 parent bc75226 commit a16cf04

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

modules/repofiles/diff_test.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99

1010
"code.gitea.io/gitea/models"
1111
"code.gitea.io/gitea/modules/test"
12+
"code.gitea.io/gitea/services/gitdiff"
1213

1314
"github.com/stretchr/testify/assert"
1415
)
@@ -25,10 +26,10 @@ func TestGetDiffPreview(t *testing.T) {
2526
treePath := "README.md"
2627
content := "# repo1\n\nDescription for repo1\nthis is a new line"
2728

28-
expectedDiff := &models.Diff{
29+
expectedDiff := &gitdiff.Diff{
2930
TotalAddition: 2,
3031
TotalDeletion: 1,
31-
Files: []*models.DiffFile{
32+
Files: []*gitdiff.DiffFile{
3233
{
3334
Name: "README.md",
3435
OldName: "README.md",
@@ -42,10 +43,10 @@ func TestGetDiffPreview(t *testing.T) {
4243
IsLFSFile: false,
4344
IsRenamed: false,
4445
IsSubmodule: false,
45-
Sections: []*models.DiffSection{
46+
Sections: []*gitdiff.DiffSection{
4647
{
4748
Name: "",
48-
Lines: []*models.DiffLine{
49+
Lines: []*gitdiff.DiffLine{
4950
{
5051
LeftIdx: 0,
5152
RightIdx: 0,

0 commit comments

Comments
 (0)