c0f10e2288
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
20 lines
380 B
Go
20 lines
380 B
Go
package i18n
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestSetLocale(t *testing.T) {
|
|
assert.Equal(t, English, locale)
|
|
SetLocale("D")
|
|
assert.Equal(t, English, locale)
|
|
SetLocale("De")
|
|
assert.Equal(t, German, locale)
|
|
SetLocale("PL")
|
|
assert.Equal(t, Polish, locale)
|
|
SetLocale("")
|
|
assert.Equal(t, English, locale)
|
|
assert.Equal(t, Default, locale)
|
|
}
|