mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-17 11:16:34 -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) {
|
func TestImageMetadata(t *testing.T) {
|
||||||
data, err := initImage("test.png").Metadata(PNG)
|
data, err := initImage("test.png").Metadata()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Cannot process the image: %#v", err)
|
t.Errorf("Cannot process the image: %#v", err)
|
||||||
}
|
}
|
||||||
|
|
@ -64,6 +64,9 @@ func TestImageMetadata(t *testing.T) {
|
||||||
if data.Size.Width != 400 {
|
if data.Size.Width != 400 {
|
||||||
t.Fatal("Invalid width size")
|
t.Fatal("Invalid width size")
|
||||||
}
|
}
|
||||||
|
if data.Type != "png" {
|
||||||
|
t.Fatal("Invalid image type")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func initImage(file string) *Image {
|
func initImage(file string) *Image {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue