debian-mirror-gitlab/spec/lib/gitlab/emoji_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
626 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Gitlab::Emoji do
describe '.gl_emoji_tag' do
it 'returns gl emoji tag if emoji is found' do
2021-12-11 22:18:48 +05:30
emoji = TanukiEmoji.find_by_alpha_code('small_airplane')
gl_tag = described_class.gl_emoji_tag(emoji)
2020-07-28 23:09:34 +05:30
expect(gl_tag).to eq('<gl-emoji title="small airplane" data-name="airplane_small" data-unicode-version="7.0">🛩</gl-emoji>')
end
2021-12-11 22:18:48 +05:30
it 'returns nil if emoji is not found' do
emoji = TanukiEmoji.find_by_alpha_code('random')
gl_tag = described_class.gl_emoji_tag(emoji)
2020-07-28 23:09:34 +05:30
expect(gl_tag).to be_nil
end
end
end