]> git.lizzy.rs Git - go-anidb.git/commitdiff
titles: Check if the anime-titles database was loaded correctly
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>
Sun, 14 Jul 2013 17:44:47 +0000 (14:44 -0300)
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>
Sun, 14 Jul 2013 17:44:47 +0000 (14:44 -0300)
titles/search_test.go

index 6b4618aad94a1dec0d5a33ccb59a422e07f127dc..9483ce2551ff858d76e7a58793362923a4088744 100755 (executable)
@@ -25,6 +25,12 @@ type TestVector struct {
        AIDs  []titles.AID
 }
 
+func TestDB(T *testing.T) {
+       if db.UpdateTime.IsZero() {
+               T.Error("Error reading anime-titles database")
+       }
+}
+
 func TestFuzzySearch(T *testing.T) {
        // Each vector goes one step deeper in the fuzzy search stack
        vec := []TestVector{