photoprism/pkg/txt/states_test.go
2021-11-11 16:00:42 +01:00

24 lines
480 B
Go

package txt
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestStatesByCountry(t *testing.T) {
t.Run("QCUnknownCountry", func(t *testing.T) {
result := StatesByCountry[""]["QC"]
assert.Equal(t, "", result)
})
t.Run("QCCanada", func(t *testing.T) {
result := StatesByCountry["ca"]["QC"]
assert.Equal(t, "Quebec", result)
})
t.Run("QCUnitedStates", func(t *testing.T) {
result := StatesByCountry["us"]["QC"]
assert.Equal(t, "", result)
})
}