use crate::channels::telegram::handler::map_to_allowed_reaction;
#[test]
fn allowed_emojis_pass_through() {
for e in ["👍", "🔥", "👀", "🎉", "💯", "🤝", "🤣", "🏆", "⚡"] {
assert_eq!(map_to_allowed_reaction(e), e, "{e} must pass through");
}
}
#[test]
fn variation_selector_is_normalized() {
assert_eq!(map_to_allowed_reaction("❤️"), "❤");
assert_eq!(map_to_allowed_reaction("✍️"), "✍");
}
#[test]
fn common_out_of_set_picks_are_aliased() {
assert_eq!(map_to_allowed_reaction("😂"), "🤣");
assert_eq!(map_to_allowed_reaction("😊"), "😁");
assert_eq!(map_to_allowed_reaction("🚀"), "🔥");
assert_eq!(map_to_allowed_reaction("🙌"), "👏");
assert_eq!(map_to_allowed_reaction("⭐"), "🤩");
}
#[test]
fn rejected_real_world_picks_fall_back_to_thumbs_up() {
assert_eq!(map_to_allowed_reaction("🦀"), "👍");
assert_eq!(map_to_allowed_reaction("✅"), "👍");
}
#[test]
fn unknown_and_whitespace_wrapped_input_falls_back() {
assert_eq!(map_to_allowed_reaction("🧿"), "👍");
assert_eq!(map_to_allowed_reaction(" 🔥 "), "🔥");
}