Use the same emoji data on the frontend and backend (#4284)
* Use the same emoji data on the frontend and backend * Move emoji.json to repository, add tests This way you don't need to install node dependencies if you only want to run Ruby code
This commit is contained in:
parent
c1bc5e14eb
commit
a390abdefb
5 changed files with 66 additions and 6 deletions
15
spec/lib/emoji_spec.rb
Normal file
15
spec/lib/emoji_spec.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Emoji do
|
||||
describe '#unicode' do
|
||||
it 'returns a unicode for a shortcode' do
|
||||
expect(Emoji.instance.unicode(':joy:')).to eq '😂'
|
||||
end
|
||||
end
|
||||
|
||||
describe '#names' do
|
||||
it 'returns an array' do
|
||||
expect(Emoji.instance.names).to be_an Array
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue