Skip to content

Commit 6d1895a

Browse files
committed
improve getExpectedGiteaContentsResponse
1 parent 19d5102 commit 6d1895a

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

services/repository/files/content_test.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ func TestMain(m *testing.M) {
2323
func getExpectedGiteaContentsResponse() *api.ContentsResponse {
2424
treePath := ".gitea"
2525
sha := "b5f7dda5e39c1eef0d4da9c20b7d8322daa7add5"
26-
encoding := ""
27-
content := ""
2826
selfURL := "https://try.gitea.io/api/v1/repos/user2/repo1/contents/" + treePath + "?ref=master"
2927
htmlURL := "https://try.gitea.io/user2/repo1/src/branch/master/" + treePath
3028
gitURL := "https://try.gitea.io/api/v1/repos/user2/repo1/git/blobs/" + sha
@@ -36,8 +34,6 @@ func getExpectedGiteaContentsResponse() *api.ContentsResponse {
3634
LastCommitSHA: "94dc45d6ec51090b36c4d5bd5d9e6f5a70da9edf",
3735
Type: "dir",
3836
Size: 0,
39-
Encoding: &encoding,
40-
Content: &content,
4137
URL: &selfURL,
4238
HTMLURL: &htmlURL,
4339
GitURL: &gitURL,
@@ -127,9 +123,6 @@ func TestGetContentsOrListForDir(t *testing.T) {
127123
readmeContentsResponse.Content = nil
128124

129125
giteaContentsResponse := getExpectedGiteaContentsResponse()
130-
// because will be in a list, doesn't have encoding and content
131-
giteaContentsResponse.Encoding = nil
132-
giteaContentsResponse.Content = nil
133126
// because .gitea is a directory, doesn't have download url
134127
giteaContentsResponse.DownloadURL = nil
135128

0 commit comments

Comments
 (0)