Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Aug 27, 2019
1 parent bc75226 commit a16cf04
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/repofiles/diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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",
Expand All @@ -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,
Expand Down

0 comments on commit a16cf04

Please sign in to comment.