mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FEATURE: default emoji override
This commit is contained in:
parent
92d61755b3
commit
9932bea7ce
2 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ class Admin::EmojisController < Admin::AdminController
|
|||
.downcase
|
||||
|
||||
# check the name doesn't already exist
|
||||
if Emoji.all.detect { |e| e.name == name }
|
||||
if Emoji.custom.detect { |e| e.name == name }
|
||||
render json: failed_json.merge(message: I18n.t("emoji.errors.name_already_exists", name: name)), status: 422
|
||||
else
|
||||
if emoji = Emoji.create_for(file, name)
|
||||
|
|
|
@ -29,7 +29,7 @@ describe Admin::EmojisController do
|
|||
|
||||
context '.create' do
|
||||
|
||||
before { Emoji.expects(:all).returns([custom_emoji]) }
|
||||
before { Emoji.expects(:custom).returns([custom_emoji]) }
|
||||
|
||||
context 'name already exist' do
|
||||
it "throws an error" do
|
||||
|
|
Loading…
Reference in a new issue