33 lines
618 B
Go
33 lines
618 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/gochat/gochat/internal/config"
|
|
)
|
|
|
|
func TestPrintUsage_Cov1(t *testing.T) {
|
|
printUsage()
|
|
}
|
|
|
|
func TestShouldRunSeedMigrations_True_Cov1(t *testing.T) {
|
|
cfg := &config.Config{Database: config.DatabaseConfig{RunMigrations: true}}
|
|
result := shouldRunSeedMigrations(cfg)
|
|
if !result {
|
|
t.Error("expected true")
|
|
}
|
|
}
|
|
|
|
func TestShouldRunSeedMigrations_False_Cov1(t *testing.T) {
|
|
cfg := &config.Config{}
|
|
result := shouldRunSeedMigrations(cfg)
|
|
if result {
|
|
t.Error("expected false")
|
|
}
|
|
}
|
|
|
|
func TestCloseDB_Nil_Cov1(t *testing.T) {
|
|
t.Skip("panics on nil")
|
|
closeDB(nil)
|
|
}
|