about summary refs log tree commit diff
path: root/spec/lib/emoji_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/emoji_spec.rb')
-rw-r--r--spec/lib/emoji_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/lib/emoji_spec.rb b/spec/lib/emoji_spec.rb
new file mode 100644
index 000000000..04931ccfb
--- /dev/null
+++ b/spec/lib/emoji_spec.rb
@@ -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