提交 bbd92e57 编写于 作者: R Riyad Preukschas

Add emoji_for_completion helper

上级 a54a9018
......@@ -14,4 +14,10 @@ module NotesHelper
"vote downvote"
end
end
def emoji_for_completion
# should be an array of strings
# so to_s can be called, because it is sufficient and to_json is too slow
Emoji::NAMES
end
end
require 'spec_helper'
describe NotesHelper do
describe "#emoji_for_completion" do
it "should be an Array of Strings" do
emoji_for_completion.should be_a(Array)
emoji_for_completion.each { |emoji| emoji.should be_a(String) }
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册