Skip to content

Commit

Permalink
improve getExpectedGiteaContentsResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
yp05327 committed Mar 14, 2024
1 parent 19d5102 commit 6d1895a
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions services/repository/files/content_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ func TestMain(m *testing.M) {
func getExpectedGiteaContentsResponse() *api.ContentsResponse {
treePath := ".gitea"
sha := "b5f7dda5e39c1eef0d4da9c20b7d8322daa7add5"
encoding := ""
content := ""
selfURL := "https://try.gitea.io/api/v1/repos/user2/repo1/contents/" + treePath + "?ref=master"
htmlURL := "https://try.gitea.io/user2/repo1/src/branch/master/" + treePath
gitURL := "https://try.gitea.io/api/v1/repos/user2/repo1/git/blobs/" + sha
Expand All @@ -36,8 +34,6 @@ func getExpectedGiteaContentsResponse() *api.ContentsResponse {
LastCommitSHA: "94dc45d6ec51090b36c4d5bd5d9e6f5a70da9edf",
Type: "dir",
Size: 0,
Encoding: &encoding,
Content: &content,
URL: &selfURL,
HTMLURL: &htmlURL,
GitURL: &gitURL,
Expand Down Expand Up @@ -127,9 +123,6 @@ func TestGetContentsOrListForDir(t *testing.T) {
readmeContentsResponse.Content = nil

giteaContentsResponse := getExpectedGiteaContentsResponse()
// because will be in a list, doesn't have encoding and content
giteaContentsResponse.Encoding = nil
giteaContentsResponse.Content = nil
// because .gitea is a directory, doesn't have download url
giteaContentsResponse.DownloadURL = nil

Expand Down

0 comments on commit 6d1895a

Please sign in to comment.