pkgdash/storage/postgres/storage_test.go

38 lines
576 B
Go
Raw Normal View History

package postgres
import (
"fmt"
"go.unistack.org/unistack-org/pkgdash/models"
"testing"
)
func TestGenerate(t *testing.T) {
m := []models.Module{
{
2023-08-11 08:58:31 +03:00
ID: 1,
Name: "test",
Version: "1.2.3",
Package: 2,
LastVersion: "23.31",
},
{
2023-08-11 08:58:31 +03:00
ID: 1,
Name: "321test",
Version: "1.3",
Package: 4,
LastVersion: "2111.31",
},
{
2023-08-11 08:58:31 +03:00
ID: 1,
Name: "testabcd",
Version: "1.2.3",
Package: 2,
LastVersion: "153453.31",
},
}
2023-08-11 08:58:31 +03:00
str := generateQuery(m)
fmt.Println(str)
}