otfe/models/model_test.go

43 lines
718 B
Go
Raw Normal View History

2022-03-12 18:06:39 +00:00
package models_test
2022-02-23 12:07:09 +00:00
import (
"testing"
2022-03-12 18:06:39 +00:00
"git.technical.kiwi/go/otfe/models"
2022-02-23 12:07:09 +00:00
)
2022-03-12 18:06:39 +00:00
func TestGetDB(t *testing.T) {
db, err := models.DB()
if !err || !db {
t.Fail()
}
2022-02-23 12:07:09 +00:00
}
func TestGetCollection(t *testing.T) {
2022-03-12 18:06:39 +00:00
//GetCollection("test")
2022-02-23 12:07:09 +00:00
}
func TestCreate(t *testing.T) {
2022-03-12 18:06:39 +00:00
//create("user", &User{Name: "Ale"})
2022-02-23 12:07:09 +00:00
}
func TestReadAll(t *testing.T) {
2022-03-12 18:06:39 +00:00
//var u []User
//readAll("user", "", nil, &u)
//t.Log(u)
2022-02-23 12:07:09 +00:00
}
func TestRead(t *testing.T) {
2022-03-12 18:06:39 +00:00
//var u User
//read("user", "name", "Ann", &u)
//t.Log(u)
2022-02-23 12:07:09 +00:00
}
func TestUpdate(t *testing.T) {
2022-03-12 18:06:39 +00:00
//update("test", "name", "Ale", &User{Name: "Bob", Email: "z"})
2022-02-23 12:07:09 +00:00
}
func TestDelete(t *testing.T) {
2022-03-12 18:06:39 +00:00
//t.Log(delete("user", "name", "Ann"))
2022-02-23 12:07:09 +00:00
}