• Toon Claes's avatar
    AwardEmoji: Don't look up url for built-in emoji · 853408a1
    Toon Claes authored
    When we serialize the attributes of an awarded emoji, we ask the url of
    the emoji. This will only be set for Custom Emoji, and to find it, we
    need to look it up in the database.
    
    Now for built-in emoji, we know all the names of those, and we know they
    don't have an url set. So if the awarded emoji is one of the built-in,
    early return without ever querying the database.
    
    To ensure this behavior, and the method will not error-out, test
    coverage is added for AwardEmoji#url.
    
    Changelog: fixed
    853408a1
award_emoji_spec.rb 7.97 KB