Skip to content

Commit f944e02

Browse files
committed
Fix test
1 parent 5939e05 commit f944e02

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

services/repository/files/content_test.go

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package files
55

66
import (
77
"testing"
8+
"time"
89

910
"code.gitea.io/gitea/models/unittest"
1011
"code.gitea.io/gitea/modules/gitrepo"
@@ -30,18 +31,19 @@ func getExpectedReadmeContentsResponse() *api.ContentsResponse {
3031
gitURL := "https://try.gitea.io/api/v1/repos/user2/repo1/git/blobs/" + sha
3132
downloadURL := "https://try.gitea.io/user2/repo1/raw/branch/master/" + treePath
3233
return &api.ContentsResponse{
33-
Name: treePath,
34-
Path: treePath,
35-
SHA: "4b4851ad51df6a7d9f25c979345979eaeb5b349f",
36-
LastCommitSHA: "65f1bf27bc3bf70f64657658635e66094edbcb4d",
37-
Type: "file",
38-
Size: 30,
39-
Encoding: &encoding,
40-
Content: &content,
41-
URL: &selfURL,
42-
HTMLURL: &htmlURL,
43-
GitURL: &gitURL,
44-
DownloadURL: &downloadURL,
34+
Name: treePath,
35+
Path: treePath,
36+
SHA: "4b4851ad51df6a7d9f25c979345979eaeb5b349f",
37+
LastCommitSHA: "65f1bf27bc3bf70f64657658635e66094edbcb4d",
38+
LastCommitWhen: time.Date(2017, time.March, 19, 16, 47, 59, 0, time.FixedZone("", -14400)),
39+
Type: "file",
40+
Size: 30,
41+
Encoding: &encoding,
42+
Content: &content,
43+
URL: &selfURL,
44+
HTMLURL: &htmlURL,
45+
GitURL: &gitURL,
46+
DownloadURL: &downloadURL,
4547
Links: &api.FileLinksResponse{
4648
Self: &selfURL,
4749
GitURL: &gitURL,

0 commit comments

Comments
 (0)