saasitone/config/config_test.go
2022-02-10 08:56:07 -05:00

21 lines
354 B
Go

package config
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestGetConfig(t *testing.T) {
_, err := GetConfig()
require.NoError(t, err)
var env environment
env = "abc"
SwitchEnvironment(env)
cfg, err := GetConfig()
require.NoError(t, err)
assert.Equal(t, env, cfg.App.Environment)
}