1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-12-28 04:32:30 +01:00
ntfy/server/cache_sqlite_test.go

24 lines
459 B
Go
Raw Normal View History

2021-12-07 17:45:15 +01:00
package server
import (
"path/filepath"
"testing"
)
func TestSqliteCache_AddMessage(t *testing.T) {
testCacheMessages(t, newSqliteTestCache(t))
}
func TestSqliteCache_MessagesTagsPrioAndTitle(t *testing.T) {
testCacheMessagesTagsPrioAndTitle(t, newSqliteTestCache(t))
}
func newSqliteTestCache(t *testing.T) cache {
filename := filepath.Join(t.TempDir(), "cache.db")
c, err := newSqliteCache(filename)
if err != nil {
t.Fatal(err)
}
return c
}