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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
b480d712
Commit
b480d712
authored
Sep 05, 2018
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for group issues search + sorting
parent
ae014e18
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
spec/controllers/groups_controller_spec.rb
spec/controllers/groups_controller_spec.rb
+22
-2
No files found.
spec/controllers/groups_controller_spec.rb
View file @
b480d712
...
...
@@ -202,8 +202,8 @@ describe GroupsController do
end
describe
'GET #issues'
do
let
(
:issue_1
)
{
create
(
:issue
,
project:
project
)
}
let
(
:issue_2
)
{
create
(
:issue
,
project:
project
)
}
let
(
:issue_1
)
{
create
(
:issue
,
project:
project
,
title:
'foo'
)
}
let
(
:issue_2
)
{
create
(
:issue
,
project:
project
,
title:
'bar'
)
}
before
do
create_list
(
:award_emoji
,
3
,
awardable:
issue_2
)
...
...
@@ -224,6 +224,26 @@ describe GroupsController do
expect
(
assigns
(
:issues
)).
to
eq
[
issue_2
,
issue_1
]
end
end
context
'searching'
do
it
'works with popularity sort'
do
get
:issues
,
id:
group
.
to_param
,
search:
'foo'
,
sort:
'popularity'
expect
(
assigns
(
:issues
)).
to
eq
([
issue_1
])
end
it
'works with priority sort'
do
get
:issues
,
id:
group
.
to_param
,
search:
'foo'
,
sort:
'priority'
expect
(
assigns
(
:issues
)).
to
eq
([
issue_1
])
end
it
'works with label priority sort'
do
get
:issues
,
id:
group
.
to_param
,
search:
'foo'
,
sort:
'label_priority'
expect
(
assigns
(
:issues
)).
to
eq
([
issue_1
])
end
end
end
describe
'GET #merge_requests'
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