Add test for location.go

This commit is contained in:
Theresa Gresch 2020-01-27 15:27:07 +01:00
parent 0868f2a2d2
commit f89ec58a03

View file

@ -84,4 +84,19 @@ func TestMediaFile_Location(t *testing.T) {
assert.Equal(t, "file: no latitude and longitude in metadata", err.Error())
}
})
t.Run("Random.docx", func(t *testing.T) {
conf := config.TestConfig()
mediaFile, err := NewMediaFile(conf.ExamplesPath() + "/Random.docx")
if err != nil {
t.Fatal(err)
}
location, err := mediaFile.Location()
assert.Error(t, err, "meta: no exif data")
assert.Nil(t, location)
})
}