mirror of
https://github.com/binwiederhier/ntfy.git
synced 2024-12-15 17:50:55 +00:00
23 lines
459 B
Go
23 lines
459 B
Go
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
|
|
}
|