Test for accented article sanitization

This commit is contained in:
Deluan 2020-09-08 09:40:41 -04:00
parent 28aefb4858
commit 6820e120cb

View file

@ -9,7 +9,7 @@ import (
var _ = Describe("mapping", func() {
Describe("sanitizeFieldForSorting", func() {
BeforeEach(func() {
conf.Server.IgnoredArticles = "The"
conf.Server.IgnoredArticles = "The O"
})
It("sanitize accents", func() {
Expect(sanitizeFieldForSorting("Céu")).To(Equal("Ceu"))
@ -17,5 +17,8 @@ var _ = Describe("mapping", func() {
It("removes articles", func() {
Expect(sanitizeFieldForSorting("The Beatles")).To(Equal("Beatles"))
})
It("removes accented articles", func() {
Expect(sanitizeFieldForSorting("Õ Blésq Blom")).To(Equal("Blesq Blom"))
})
})
})