forked from forgejo/forgejo
Backport #25639 by @lunny Fix #25257 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
b4460cf541
commit
2b79d3fd52
19 changed files with 108 additions and 67 deletions
|
@ -45,11 +45,12 @@ func TestAPIGetCommentAttachment(t *testing.T) {
|
|||
var apiAttachment api.Attachment
|
||||
DecodeJSON(t, resp, &apiAttachment)
|
||||
|
||||
expect := convert.ToAttachment(attachment)
|
||||
expect := convert.ToAPIAttachment(repo, attachment)
|
||||
assert.Equal(t, expect.ID, apiAttachment.ID)
|
||||
assert.Equal(t, expect.Name, apiAttachment.Name)
|
||||
assert.Equal(t, expect.UUID, apiAttachment.UUID)
|
||||
assert.Equal(t, expect.Created.Unix(), apiAttachment.Created.Unix())
|
||||
assert.Equal(t, expect.DownloadURL, apiAttachment.DownloadURL)
|
||||
}
|
||||
|
||||
func TestAPIListCommentAttachments(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue