chore: € character at article model TITLE_CHARACTERS_ALLOWED (#17790)
This commit is contained in:
parent
87a58c2dcf
commit
2912365109
2 changed files with 9 additions and 0 deletions
|
|
@ -83,6 +83,7 @@ class Article < ApplicationRecord
|
|||
\u303d # Either a line chart plummeting or the letter M, not sure
|
||||
\u3297 # Circled Ideograph Congratulation
|
||||
\u3299 # Circled Ideograph Secret
|
||||
\u20ac # Euro symbol (€)
|
||||
\u{1f000}-\u{1ffff} # More common emoji
|
||||
]+/m
|
||||
# rubocop:enable Lint/DuplicateRegexpCharacterClassElement
|
||||
|
|
|
|||
|
|
@ -237,6 +237,14 @@ RSpec.describe Article, type: :model do
|
|||
expect(article.title).to eq allowed_title
|
||||
end
|
||||
|
||||
it "allows Euro symbol (€)" do
|
||||
allowed_title = "Euro code €€€"
|
||||
|
||||
article = create(:article, title: allowed_title)
|
||||
|
||||
expect(article.title).to eq allowed_title
|
||||
end
|
||||
|
||||
it "produces a proper title" do
|
||||
test_article = build(:article, title: "An Article Title")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue