4e06deda76
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
22 lines
578 B
Go
22 lines
578 B
Go
package entity
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestNewCountry(t *testing.T) {
|
|
t.Run("name Fantasy code fy", func(t *testing.T) {
|
|
country := NewCountry("fy", "Fantasy")
|
|
assert.Equal(t, "fy", country.ID)
|
|
assert.Equal(t, "Fantasy", country.CountryName)
|
|
assert.Equal(t, "fantasy", country.CountrySlug)
|
|
})
|
|
t.Run("name Unknown code Unknown", func(t *testing.T) {
|
|
country := NewCountry("", "")
|
|
assert.Equal(t, "zz", country.ID)
|
|
assert.Equal(t, "Unknown", country.CountryName)
|
|
assert.Equal(t, "unknown", country.CountrySlug)
|
|
})
|
|
}
|