Backend: Add unit tests for internal/maps
This commit is contained in:
parent
724953e432
commit
985da3530f
1 changed files with 9 additions and 0 deletions
|
@ -16,4 +16,13 @@ func TestCountryName(t *testing.T) {
|
|||
result := CountryName("us")
|
||||
assert.Equal(t, "USA", result)
|
||||
})
|
||||
|
||||
t.Run("empty", func(t *testing.T) {
|
||||
result := CountryName("")
|
||||
assert.Equal(t, "Unknown", result)
|
||||
})
|
||||
t.Run("invalid", func(t *testing.T) {
|
||||
result := CountryName("xyz")
|
||||
assert.Equal(t, "Unknown", result)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue