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
473138f1
Commit
473138f1
authored
Oct 22, 2018
by
Eagllus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update related tests based on comment
parent
c42f15c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
spec/models/milestone_spec.rb
spec/models/milestone_spec.rb
+11
-6
No files found.
spec/models/milestone_spec.rb
View file @
473138f1
...
...
@@ -353,21 +353,26 @@ describe Milestone do
context
'when the projects have milestones'
do
let
(
:project_1
)
{
create
(
:project
)
}
let
(
:project_2
)
{
create
(
:project
)
}
let
(
:project_3
)
{
create
(
:project
)
}
let
(
:group_1
)
{
create
(
:group
)
}
let
(
:group_2
)
{
create
(
:group
)
}
before
do
create
(
:closed_milestone
,
title:
'Active Group Milestone'
,
project:
project_3
)
create
(
:active_milestone
,
title:
'Active Group Milestone'
,
project:
project_1
)
create
(
:active_milestone
,
title:
'Active Group Milestone'
,
project:
project_2
)
create
(
:closed_milestone
,
title:
'Closed Group Milestone'
,
project:
project_1
)
create
(
:active_milestone
,
title:
'Active Group Milestone'
,
project:
project_2
)
create
(
:closed_milestone
,
title:
'Closed Group Milestone'
,
project:
project_2
)
create
(
:closed_milestone
,
title:
'Closed Group Milestone'
,
project:
project_3
)
create
(
:closed_milestone
,
title:
'Active Group Milestone'
,
group:
group_1
)
create
(
:closed_milestone
,
title:
'Closed Group Milestone'
,
group:
group_1
)
create
(
:closed_milestone
,
title:
'Active Group Milestone'
,
group:
group_2
)
create
(
:closed_milestone
,
title:
'Closed Group Milestone'
,
group:
group_2
)
end
it
'returns the quantity of milestones in each possible state'
do
expected_count
=
{
opened:
5
,
closed:
4
,
all:
9
}
expected_count
=
{
opened:
5
,
closed:
6
,
all:
11
}
count
=
described_class
.
states_count
(
Project
.
all
,
Group
.
all
)
count
=
described_class
.
states_count
(
Project
.
all
)
p
Project
.
all
,
Group
.
all
expect
(
count
).
to
eq
(
expected_count
)
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