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
2bb30949
Commit
2bb30949
authored
May 23, 2019
by
lmcandrew
Committed by
Małgorzata Ksionek
Jun 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicate award_emojis specs from autocomplete_controller_spec.rb
parent
fb383dc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
38 deletions
+0
-38
spec/controllers/autocomplete_controller_spec.rb
spec/controllers/autocomplete_controller_spec.rb
+0
-38
No files found.
spec/controllers/autocomplete_controller_spec.rb
View file @
2bb30949
...
...
@@ -335,44 +335,6 @@ describe AutocompleteController do
end
end
end
context
'GET award_emojis'
do
let
(
:user2
)
{
create
(
:user
)
}
let!
(
:award_emoji1
)
{
create_list
(
:award_emoji
,
2
,
user:
user
,
name:
'thumbsup'
)
}
let!
(
:award_emoji2
)
{
create_list
(
:award_emoji
,
1
,
user:
user
,
name:
'thumbsdown'
)
}
let!
(
:award_emoji3
)
{
create_list
(
:award_emoji
,
3
,
user:
user
,
name:
'star'
)
}
let!
(
:award_emoji4
)
{
create_list
(
:award_emoji
,
1
,
user:
user
,
name:
'tea'
)
}
context
'unauthorized user'
do
it
'returns empty json'
do
get
:award_emojis
expect
(
json_response
).
to
be_empty
end
end
context
'sign in as user without award emoji'
do
it
'returns empty json'
do
sign_in
(
user2
)
get
:award_emojis
expect
(
json_response
).
to
be_empty
end
end
context
'sign in as user with award emoji'
do
it
'returns json sorted by name count'
do
sign_in
(
user
)
get
:award_emojis
expect
(
json_response
.
count
).
to
eq
4
expect
(
json_response
[
0
]).
to
match
(
'name'
=>
'star'
)
expect
(
json_response
[
1
]).
to
match
(
'name'
=>
'thumbsup'
)
expect
(
json_response
[
2
]).
to
match
(
'name'
=>
'tea'
)
expect
(
json_response
[
3
]).
to
match
(
'name'
=>
'thumbsdown'
)
end
end
end
end
context
'GET award_emojis'
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