INNER CODE UNIT · Go

TestSetupGoyaveConfig_SQLite

welovemedia/ffmate · cmd/server_test.go:57

func TestSetupGoyaveConfig_SQLite(t *testing.T) {
	home, _ := os.UserHomeDir()
	viper.Set("database", "~/test.sqlite")
	viper.Set("app.name", "ffmate")
	viper.Set("app.version", "1.2.3")
	viper.Set("port", 8080)

	cfg := setupGoyaveConfig()

	assert.Equal(t, "sqlite3", cfg.Get("database.connection"))
	assert.Equal(t, filepath.Join(home, "test.sqlite"), cfg.Get("database.name"))
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…