Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f9c6ad70
Commit
f9c6ad70
authored
Nov 11, 2019
by
Aleksei Lipniagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply review suggestions
parent
64ac6674
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
app/models/award_emoji.rb
app/models/award_emoji.rb
+1
-1
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
+1
-2
No files found.
app/models/award_emoji.rb
View file @
f9c6ad70
...
...
@@ -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?
...
...
spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
View file @
f9c6ad70
...
...
@@ -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
(
award_emoji
.
map
(
&
:name
)).
to
match_array
(
%w[thumbsup coffee]
)
expect
(
award_emoji
.
map
(
&
:name
)).
to
contain_exactly
(
'thumbsup'
,
'coffee'
)
end
it
'restores the correct service'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment