2024-02-12 12:40:49 +01:00
|
|
|
package database
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestDbConnect(t *testing.T) {
|
|
|
|
db := DbConnect()
|
|
|
|
_ = db
|
|
|
|
}
|
2024-02-27 05:00:04 +01:00
|
|
|
|
|
|
|
func TestDbAddUser(t *testing.T) {
|
|
|
|
db := DbConnect()
|
|
|
|
err := db.AddUser("test", "password")
|
|
|
|
if err != nil {
|
|
|
|
t.Error("AddUser failed:", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestDbRemoveUser(t *testing.T) {
|
|
|
|
db := DbConnect()
|
|
|
|
err := db.RemoveUser("test")
|
|
|
|
if err != nil {
|
|
|
|
t.Error("RemoveUser failed:", err)
|
|
|
|
}
|
|
|
|
}
|