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
0c84713e
Commit
0c84713e
authored
Aug 24, 2017
by
Maxim Rydkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix rubocop
parent
7fe15d4f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
spec/finders/yet_another_users_finder_spec.rb
spec/finders/yet_another_users_finder_spec.rb
+7
-8
No files found.
spec/finders/yet_another_users_finder_spec.rb
View file @
0c84713e
...
...
@@ -21,13 +21,13 @@ describe YetAnotherUsersFinder do
it
{
is_expected
.
to
match_array
([
user1
,
external_user
,
omniauth_user
,
current_user
])
}
context
'when filtered by search'
do
let
(
:params
)
{
{
search:
'johndoe'
}
}
let
(
:params
)
{
{
search:
'johndoe'
}
}
it
{
is_expected
.
to
match_array
([
user1
])
}
end
context
'when filtered by skip_users'
do
let
(
:params
)
{
{
skip_users:
[
omniauth_user
.
id
,
current_user
.
id
]
}
}
let
(
:params
)
{
{
skip_users:
[
omniauth_user
.
id
,
current_user
.
id
]
}
}
it
{
is_expected
.
to
match_array
([
user1
,
external_user
])
}
end
...
...
@@ -39,20 +39,19 @@ describe YetAnotherUsersFinder do
let!
(
:done_todo2
)
{
create
(
:todo
,
user:
user1
,
author:
external_user
,
state: :done
)
}
context
'when filtered by todo_filter without todo_state_filter'
do
let
(
:params
)
{
{
todo_filter:
true
}
}
let
(
:params
)
{
{
todo_filter:
true
}
}
it
{
is_expected
.
to
match_array
([])
}
end
context
'when filtered by todo_filter with pending todo_state_filter'
do
let
(
:params
)
{
{
todo_filter:
true
,
todo_state_filter:
'pending'
}
}
let
(
:params
)
{
{
todo_filter:
true
,
todo_state_filter:
'pending'
}
}
it
{
is_expected
.
to
match_array
([
user1
])
}
end
context
'when filtered by todo_filter with done todo_state_filter'
do
let
(
:params
)
{
{
todo_filter:
true
,
todo_state_filter:
'done'
}
}
let
(
:params
)
{
{
todo_filter:
true
,
todo_state_filter:
'done'
}
}
it
{
is_expected
.
to
match_array
([
external_user
])
}
end
...
...
@@ -60,13 +59,13 @@ describe YetAnotherUsersFinder do
context
'when filtered by current_user'
do
let
(
:current_user
)
{
user2
}
let
(
:params
)
{
{
current_user:
true
}
}
let
(
:params
)
{
{
current_user:
true
}
}
it
{
is_expected
.
to
match_array
([
user2
,
user1
,
external_user
,
omniauth_user
])
}
end
context
'when filtered by author_id'
do
let
(
:params
)
{
{
author_id:
user2
.
id
}
}
let
(
:params
)
{
{
author_id:
user2
.
id
}
}
it
{
is_expected
.
to
match_array
([
user2
,
user1
,
external_user
,
omniauth_user
,
current_user
])
}
end
...
...
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