mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Tests: Add unit tests for pkg/clean
This commit is contained in:
@@ -62,4 +62,14 @@ func TestState(t *testing.T) {
|
||||
assert.Equal(t, "", result)
|
||||
})
|
||||
|
||||
t.Run("Control Character", func(t *testing.T) {
|
||||
result := State("Washington"+string(rune(127)), "us")
|
||||
assert.Equal(t, "Washington", result)
|
||||
})
|
||||
|
||||
t.Run("Special Chars", func(t *testing.T) {
|
||||
result := State("Wa?shing*ton"+string(rune(127)), "us")
|
||||
assert.Equal(t, "Washington", result)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user