Backend: Add unit tests for internal/maps

This commit is contained in:
Theresa Gresch 2020-07-08 10:03:47 +02:00
parent 724953e432
commit 985da3530f

View file

@ -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)
})
}