Initial commit
This commit is contained in:
23
mimedb_test.go
Normal file
23
mimedb_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package mimedb
|
||||
|
||||
import (
|
||||
"mime"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestLoadTypes(t *testing.T) {
|
||||
if mime.TypeByExtension(".webmanifest") != "" {
|
||||
t.Log("We have .webmanifest BEFORE loading the DB. Passing would be false negative!")
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
if err := LoadTypes(); err != nil {
|
||||
t.Logf("Unexpected error loading types: %s", err)
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
if mime.TypeByExtension(".webmanifest") != "application/manifest+json" {
|
||||
t.Logf("A MIME type for .webmanifest was not found")
|
||||
t.Fail()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user