mirror of
https://github.com/ManyakRus/crud_generator.git
synced 2024-12-15 09:44:47 +02:00
25 lines
533 B
Go
25 lines
533 B
Go
package postgres
|
|
|
|
import (
|
|
"github.com/ManyakRus/crud_generator/internal/config"
|
|
"github.com/ManyakRus/crud_generator/internal/database"
|
|
"github.com/ManyakRus/starter/postgres_gorm"
|
|
"testing"
|
|
)
|
|
|
|
func TestFillMassTable(t *testing.T) {
|
|
//ConfigMain.LoadEnv()
|
|
config.LoadSettingsTxt()
|
|
postgres_gorm.Connect()
|
|
defer postgres_gorm.CloseConnection()
|
|
|
|
Otvet, err := database.FillMapTable()
|
|
if err != nil {
|
|
t.Error("TestFillMassTable() error: ", err)
|
|
}
|
|
|
|
if len(Otvet) == 0 {
|
|
t.Error("TestFillMassTable() error: len =0")
|
|
}
|
|
}
|