mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-19 10:50:25 -06:00
fix tests
This commit is contained in:
@@ -49,6 +49,21 @@ func init() {
|
||||
service.Server().Start()
|
||||
}
|
||||
|
||||
func TestGetThumbnailInvalidImage(t *testing.T) {
|
||||
req := proto.GetRequest{
|
||||
Filepath: "invalid.png",
|
||||
Filetype: proto.GetRequest_PNG,
|
||||
Etag: "33a64df551425fcc55e4d42a148795d9f25f89d4",
|
||||
Height: 32,
|
||||
Width: 32,
|
||||
}
|
||||
client := service.Client()
|
||||
cl := proto.NewThumbnailService("com.owncloud.api.thumbnails", client)
|
||||
_, err := cl.GetThumbnail(context.Background(), &req)
|
||||
|
||||
assert.NotNil(t, err)
|
||||
}
|
||||
|
||||
func TestGetThumbnail(t *testing.T) {
|
||||
req := proto.GetRequest{
|
||||
Filepath: "oc.png",
|
||||
@@ -70,18 +85,3 @@ func TestGetThumbnail(t *testing.T) {
|
||||
|
||||
assert.Equal(t, "image/png", rsp.GetMimetype())
|
||||
}
|
||||
|
||||
func TestGetThumbnailInvalidImage(t *testing.T) {
|
||||
req := proto.GetRequest{
|
||||
Filepath: "invalid.png",
|
||||
Filetype: proto.GetRequest_PNG,
|
||||
Etag: "33a64df551425fcc55e4d42a148795d9f25f89d4",
|
||||
Height: 32,
|
||||
Width: 32,
|
||||
}
|
||||
client := service.Client()
|
||||
cl := proto.NewThumbnailService("com.owncloud.api.thumbnails", client)
|
||||
_, err := cl.GetThumbnail(context.Background(), &req)
|
||||
|
||||
assert.NotNil(t, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user