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
fd177184
Commit
fd177184
authored
Sep 08, 2021
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unused methods from Gitlab::Emoji
parent
710bfde3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
41 deletions
+0
-41
lib/gitlab/emoji.rb
lib/gitlab/emoji.rb
+0
-8
spec/lib/gitlab/emoji_spec.rb
spec/lib/gitlab/emoji_spec.rb
+0
-33
No files found.
lib/gitlab/emoji.rb
View file @
fd177184
...
...
@@ -4,10 +4,6 @@ module Gitlab
module
Emoji
extend
self
def
emojis
TanukiEmoji
.
index
.
instance_variable_get
(
:@name_index
)
end
def
emojis_by_moji
TanukiEmoji
.
index
.
instance_variable_get
(
:@codepoints_index
)
end
...
...
@@ -16,10 +12,6 @@ module Gitlab
emojis_by_moji
.
keys
end
def
emojis_names
emojis
.
keys
end
def
emojis_aliases
@emoji_aliases
||=
Gitlab
::
Json
.
parse
(
File
.
read
(
Rails
.
root
.
join
(
'fixtures'
,
'emojis'
,
'aliases.json'
)))
end
...
...
spec/lib/gitlab/emoji_spec.rb
View file @
fd177184
...
...
@@ -3,43 +3,10 @@
require
'spec_helper'
RSpec
.
describe
Gitlab
::
Emoji
do
let_it_be
(
:emojis
)
{
TanukiEmoji
.
index
.
all
.
index_by
(
&
:name
)
}
let_it_be
(
:emojis_by_moji
)
{
TanukiEmoji
.
index
.
all
.
index_by
(
&
:codepoints
)
}
let_it_be
(
:emoji_unicode_versions_by_name
)
{
Gitlab
::
Json
.
parse
(
File
.
read
(
Rails
.
root
.
join
(
'fixtures'
,
'emojis'
,
'emoji-unicode-version-map.json'
)))
}
let_it_be
(
:emojis_aliases
)
{
Gitlab
::
Json
.
parse
(
File
.
read
(
Rails
.
root
.
join
(
'fixtures'
,
'emojis'
,
'aliases.json'
)))
}
describe
'.emojis'
do
it
'returns emojis'
do
current_emojis
=
described_class
.
emojis
.
values
expect
(
current_emojis
).
to
match_array
(
emojis
)
end
end
describe
'.emojis_by_moji'
do
it
'return emojis by moji'
do
current_emojis_by_moji
=
described_class
.
emojis_by_moji
expect
(
current_emojis_by_moji
).
to
eq
(
emojis_by_moji
)
end
end
describe
'.emojis_unicodes'
do
it
'returns emoji unicodes'
do
emoji_keys
=
described_class
.
emojis_unicodes
expect
(
emoji_keys
).
to
eq
(
emojis_by_moji
.
keys
)
end
end
describe
'.emojis_names'
do
it
'returns emoji names'
do
emoji_names
=
described_class
.
emojis_names
expect
(
emoji_names
).
to
eq
(
emojis
.
keys
)
end
end
describe
'.emojis_aliases'
do
it
'returns emoji aliases'
do
emoji_aliases
=
described_class
.
emojis_aliases
...
...
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