mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[34475] Support emoji 13.0 (#17741)
* generated data file from 'make emojis' * format * fix year * fix tests * fix header again
This commit is contained in:
@@ -1341,7 +1341,7 @@ func TestImportValidateDirectPostImportData(t *testing.T) {
|
||||
|
||||
func TestImportValidateEmojiImportData(t *testing.T) {
|
||||
data := EmojiImportData{
|
||||
Name: ptrStr("parrot"),
|
||||
Name: ptrStr("parrot2"),
|
||||
Image: ptrStr("/path/to/image"),
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ func removeUnicodeSkinTone(unicodeString string) string {
|
||||
if len(skinToneLocations) == 0 {
|
||||
return unicodeString
|
||||
}
|
||||
if _, count := model.GetEmojiNameFromUnicode(unicodeString); count == 1 {
|
||||
if _, count := model.GetEmojiNameFromUnicode(unicodeString); count > 0 {
|
||||
return unicodeString
|
||||
}
|
||||
unicodeWithRemovedSkinTone := unicodeString[:skinToneLocations[0]] + unicodeString[skinToneLocations[1]:]
|
||||
|
||||
@@ -21,10 +21,10 @@ func TestGetCustomStatus(t *testing.T) {
|
||||
"👙Swimming": {Emoji: model.DefaultCustomStatusEmoji, Text: "👙Swimming"},
|
||||
"👍🏿 Okay": {Emoji: "+1_dark_skin_tone", Text: "Okay"},
|
||||
"🤴🏾 Dark king": {Emoji: "prince_medium_dark_skin_tone", Text: "Dark king"},
|
||||
"⛹🏾♀️ Playing basketball": {Emoji: "basketball_woman", Text: "Playing basketball"},
|
||||
"🏋🏿♀️ Weightlifting": {Emoji: "weight_lifting_woman", Text: "Weightlifting"},
|
||||
"⛹🏾♀️ Playing basketball": {Emoji: "woman-bouncing-ball_medium_dark_skin_tone", Text: "Playing basketball"},
|
||||
"🏋🏿♀️ Weightlifting": {Emoji: "woman-lifting-weights_dark_skin_tone", Text: "Weightlifting"},
|
||||
"🏄 Surfing": {Emoji: "surfer", Text: "Surfing"},
|
||||
"👨👨👦👦 Family": {Emoji: "family_man_man_boy_boy", Text: "Family"},
|
||||
"👨👨👦👦 Family": {Emoji: "man-man-boy-boy", Text: "Family"},
|
||||
} {
|
||||
actual := GetCustomStatus(msg)
|
||||
if actual.Emoji != expected.Emoji || actual.Text != expected.Text {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user