forked from SunRed/discord-tweeter
Initial commit
This commit is contained in:
commit
eca46fcadd
21 changed files with 1666 additions and 0 deletions
54
cmd/database_test.go
Normal file
54
cmd/database_test.go
Normal file
|
@ -0,0 +1,54 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/jmoiron/sqlx"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"testing"
|
||||
)
|
||||
|
||||
const (
|
||||
testDbPath = "../db/testdb.db"
|
||||
)
|
||||
|
||||
var (
|
||||
connection *sqlx.DB
|
||||
)
|
||||
|
||||
func setupSuite(t *testing.T) func(t *testing.T) {
|
||||
conn, err := sqlx.Connect("sqlite3", testDbPath)
|
||||
if err != nil {
|
||||
t.Errorf("")
|
||||
}
|
||||
connection = conn
|
||||
|
||||
return func(t *testing.T) {
|
||||
conn.Close()
|
||||
}
|
||||
}
|
||||
|
||||
func setupTest(t *testing.T) func(t *testing.T) {
|
||||
|
||||
return func(t *testing.T) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetNewestTweet(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func TestGetTweets(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func TestContainsTweet(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func TestInsertTweet(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func TestPruneOldestTweets(t *testing.T) {
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue