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
7141f96a
Commit
7141f96a
authored
Jun 01, 2021
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix iterations_finder_spec.rb which failed on PG11 only
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
5b5ba914
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
ee/spec/finders/iterations_finder_spec.rb
ee/spec/finders/iterations_finder_spec.rb
+4
-8
No files found.
ee/spec/finders/iterations_finder_spec.rb
View file @
7141f96a
...
...
@@ -67,9 +67,7 @@ RSpec.describe IterationsFinder do
end
it
'orders iterations by due date'
do
iteration
=
create
(
:iteration
,
:skip_future_date_validation
,
group:
group
,
start_date:
5
.
days
.
ago
,
due_date:
3
.
days
.
ago
)
expect
(
subject
.
to_a
).
to
eq
([
iteration
,
closed_iteration
,
root_closed_iteration
,
started_group_iteration
,
root_group_iteration
,
upcoming_group_iteration
])
expect
(
subject
.
to_a
).
to
eq
([
closed_iteration
,
root_closed_iteration
,
started_group_iteration
,
root_group_iteration
,
upcoming_group_iteration
])
end
end
...
...
@@ -136,17 +134,15 @@ RSpec.describe IterationsFinder do
end
it
'returns iterations which start before the timeframe'
do
iteration
=
create
(
:iteration
,
:skip_project_validation
,
:skip_future_date_validation
,
group:
group
,
start_date:
5
.
days
.
ago
,
due_date:
3
.
days
.
ago
)
params
.
merge!
(
start_date:
3
.
days
.
ago
,
end_date:
2
.
days
.
ago
)
expect
(
subject
).
to
match_array
([
iteration
,
closed_iteration
,
root_closed_iteration
])
expect
(
subject
).
to
match_array
([
closed_iteration
,
root_closed_iteration
])
end
it
'returns iterations which end after the timeframe'
do
iteration
=
create
(
:iteration
,
:skip_project_validation
,
group:
group
,
start_date:
9
.
days
.
from_now
,
due_date:
2
.
weeks
.
from_now
)
params
.
merge!
(
start_date:
9
.
days
.
from_now
,
end_date:
10
.
days
.
from_now
)
params
.
merge!
(
start_date:
3
.
days
.
from_now
,
end_date:
5
.
days
.
from_now
)
expect
(
subject
).
to
match_array
([
iteration
])
expect
(
subject
).
to
match_array
([
upcoming_group_
iteration
])
end
describe
'when one of the timeframe params are missing'
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