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
77a98c36
Commit
77a98c36
authored
Jul 17, 2019
by
blunceford
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up tests for group milestones
parent
baa2d078
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
spec/controllers/dashboard/milestones_controller_spec.rb
spec/controllers/dashboard/milestones_controller_spec.rb
+3
-14
No files found.
spec/controllers/dashboard/milestones_controller_spec.rb
View file @
77a98c36
...
...
@@ -47,6 +47,8 @@ describe Dashboard::MilestonesController do
describe
"#index"
do
let
(
:public_group
)
{
create
(
:group
,
:public
)
}
let!
(
:public_milestone
)
{
create
(
:milestone
,
group:
public_group
)
}
let!
(
:closed_group_milestone
)
{
create
(
:milestone
,
group:
group
,
state:
'closed'
)
}
let!
(
:closed_project_milestone
)
{
create
(
:milestone
,
project:
project
,
state:
'closed'
)
}
render_views
...
...
@@ -60,9 +62,6 @@ describe Dashboard::MilestonesController do
end
it
'returns closed group and project milestones to which the user belongs'
do
closed_group_milestone
=
create
(
:milestone
,
group:
group
,
state:
'closed'
)
closed_project_milestone
=
create
(
:milestone
,
project:
project
,
state:
'closed'
)
get
:index
,
params:
{
state:
'closed'
},
format: :json
expect
(
response
).
to
have_gitlab_http_status
(
200
)
...
...
@@ -89,17 +88,7 @@ describe Dashboard::MilestonesController do
expect
(
response
.
body
).
not_to
include
(
project_milestone
.
title
)
end
it
'shows counts of group and project milestones to which the user belongs to'
do
get
:index
expect
(
response
.
body
).
to
include
(
"Open
\n
<span class=
\"
badge badge-pill
\"
>2</span>"
)
expect
(
response
.
body
).
to
include
(
"Closed
\n
<span class=
\"
badge badge-pill
\"
>0</span>"
)
end
it
'shows counts of closed group and project milestones to which the user belongs to'
do
closed_group_milestone
=
create
(
:milestone
,
group:
group
,
state:
'closed'
)
closed_project_milestone
=
create
(
:milestone
,
project:
project
,
state:
'closed'
)
it
'shows counts of open and closed group and project milestones to which the user belongs to'
do
get
:index
expect
(
response
.
body
).
to
include
(
"Open
\n
<span class=
\"
badge badge-pill
\"
>2</span>"
)
...
...
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