mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-09 07:28:44 -07:00
fix(test): image metadata
This commit is contained in:
parent
0d13e86634
commit
89c2d44452
1 changed files with 4 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ func TestImageConvert(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestImageMetadata(t *testing.T) {
|
||||
data, err := initImage("test.png").Metadata(PNG)
|
||||
data, err := initImage("test.png").Metadata()
|
||||
if err != nil {
|
||||
t.Errorf("Cannot process the image: %#v", err)
|
||||
}
|
||||
|
|
@ -64,6 +64,9 @@ func TestImageMetadata(t *testing.T) {
|
|||
if data.Size.Width != 400 {
|
||||
t.Fatal("Invalid width size")
|
||||
}
|
||||
if data.Type != "png" {
|
||||
t.Fatal("Invalid image type")
|
||||
}
|
||||
}
|
||||
|
||||
func initImage(file string) *Image {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue