saasitone/config/config_test.go

21 lines
354 B
Go
Raw Normal View History

package config
import (
"testing"
2021-12-19 11:56:00 -08:00
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestGetConfig(t *testing.T) {
_, err := GetConfig()
require.NoError(t, err)
2021-12-19 11:56:00 -08:00
2022-02-10 05:56:07 -08:00
var env environment
2021-12-19 11:56:00 -08:00
env = "abc"
SwitchEnvironment(env)
cfg, err := GetConfig()
require.NoError(t, err)
assert.Equal(t, env, cfg.App.Environment)
}