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
bfe5f2d1
Commit
bfe5f2d1
authored
Jul 07, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve finder spec
parent
037ad5a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
spec/finders/users_finder_spec.rb
spec/finders/users_finder_spec.rb
+4
-1
No files found.
spec/finders/users_finder_spec.rb
View file @
bfe5f2d1
...
@@ -47,11 +47,14 @@ describe UsersFinder do
...
@@ -47,11 +47,14 @@ describe UsersFinder do
end
end
it
'filters by created_at'
do
it
'filters by created_at'
do
filtered_user_before
=
create
(
:user
,
created_at:
3
.
days
.
ago
)
filtered_user_after
=
create
(
:user
,
created_at:
Time
.
now
+
3
.
days
)
users
=
described_class
.
new
(
user
,
users
=
described_class
.
new
(
user
,
created_after:
2
.
days
.
ago
,
created_after:
2
.
days
.
ago
,
created_before:
Time
.
now
+
2
.
days
).
execute
created_before:
Time
.
now
+
2
.
days
).
execute
expect
(
users
.
count
).
to
eq
(
4
)
expect
(
users
.
map
(
&
:username
)).
not_to
include
([
filtered_user_before
.
username
,
filtered_user_after
.
username
]
)
end
end
end
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