diff --git a/services/repository/files/file_test.go b/services/repository/files/file_test.go index b2f51e3c820..6fa636058aa 100644 --- a/services/repository/files/file_test.go +++ b/services/repository/files/file_test.go @@ -5,6 +5,7 @@ package files import ( "testing" + "time" "code.gitea.io/gitea/models/unittest" "code.gitea.io/gitea/modules/gitrepo" @@ -42,18 +43,19 @@ func getExpectedFileResponse() *api.FileResponse { downloadURL := setting.AppURL + "user2/repo1/raw/branch/master/" + treePath return &api.FileResponse{ Content: &api.ContentsResponse{ - Name: treePath, - Path: treePath, - SHA: sha, - LastCommitSHA: "65f1bf27bc3bf70f64657658635e66094edbcb4d", - Type: "file", - Size: 30, - Encoding: &encoding, - Content: &content, - URL: &selfURL, - HTMLURL: &htmlURL, - GitURL: &gitURL, - DownloadURL: &downloadURL, + Name: treePath, + Path: treePath, + SHA: sha, + LastCommitSHA: "65f1bf27bc3bf70f64657658635e66094edbcb4d", + LastCommitWhen: time.Date(2017, 3, 19, 16, 47, 59, 0, time.FixedZone("", -4)), + Type: "file", + Size: 30, + Encoding: &encoding, + Content: &content, + URL: &selfURL, + HTMLURL: &htmlURL, + GitURL: &gitURL, + DownloadURL: &downloadURL, Links: &api.FileLinksResponse{ Self: &selfURL, GitURL: &gitURL,