aboutsummaryrefslogtreecommitdiffstats
path: root/modules/repofiles/diff_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/repofiles/diff_test.go')
-rw-r--r--modules/repofiles/diff_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/repofiles/diff_test.go b/modules/repofiles/diff_test.go
index bc7d4ebad6..de5ed1d754 100644
--- a/modules/repofiles/diff_test.go
+++ b/modules/repofiles/diff_test.go
@@ -9,6 +9,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/test"
+ "code.gitea.io/gitea/services/gitdiff"
"github.com/stretchr/testify/assert"
)
@@ -25,10 +26,10 @@ func TestGetDiffPreview(t *testing.T) {
treePath := "README.md"
content := "# repo1\n\nDescription for repo1\nthis is a new line"
- expectedDiff := &models.Diff{
+ expectedDiff := &gitdiff.Diff{
TotalAddition: 2,
TotalDeletion: 1,
- Files: []*models.DiffFile{
+ Files: []*gitdiff.DiffFile{
{
Name: "README.md",
OldName: "README.md",
@@ -42,10 +43,10 @@ func TestGetDiffPreview(t *testing.T) {
IsLFSFile: false,
IsRenamed: false,
IsSubmodule: false,
- Sections: []*models.DiffSection{
+ Sections: []*gitdiff.DiffSection{
{
Name: "",
- Lines: []*models.DiffLine{
+ Lines: []*gitdiff.DiffLine{
{
LeftIdx: 0,
RightIdx: 0,