Commit f9c6ad70 authored by Aleksei Lipniagov's avatar Aleksei Lipniagov

Apply review suggestions

parent 64ac6674
Pipeline #95109341 passed with stages
in 103 minutes and 54 seconds
......@@ -12,7 +12,7 @@ class AwardEmoji < ApplicationRecord
belongs_to :user
validates :user, presence: true
validates :awardable, presence: true, unless: [:importing?]
validates :awardable, presence: true, unless: :importing?
validates :name, presence: true, inclusion: { in: Gitlab::Emoji.emojis_names }
validates :name, uniqueness: { scope: [:user, :awardable_type, :awardable_id] }, unless: :ghost_user?
......@@ -217,8 +217,7 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
it 'has award emoji for a snippet' do
award_emoji = @project.snippets.first.award_emoji
expect(award_emoji.count).to eq(2)
expect( match_array(%w[thumbsup coffee])
expect( contain_exactly('thumbsup', 'coffee')
it 'restores the correct service' do
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment