Add test for location.go
This commit is contained in:
parent
0868f2a2d2
commit
f89ec58a03
1 changed files with 15 additions and 0 deletions
|
@ -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)
|
||||
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue