Initial commit

This commit is contained in:
Manuel 2023-08-29 18:00:00 +02:00
commit eca46fcadd
Signed by: Manuel
GPG key ID: 4085037435E1F07A
21 changed files with 1666 additions and 0 deletions

54
cmd/database_test.go Normal file
View 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) {
}