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
43f32c6b
Commit
43f32c6b
authored
Oct 03, 2018
by
Eagllus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for the milestone count
parent
3cd51173
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
spec/controllers/dashboard/milestones_controller_spec.rb
spec/controllers/dashboard/milestones_controller_spec.rb
+9
-0
No files found.
spec/controllers/dashboard/milestones_controller_spec.rb
View file @
43f32c6b
...
@@ -45,6 +45,8 @@ describe Dashboard::MilestonesController do
...
@@ -45,6 +45,8 @@ describe Dashboard::MilestonesController do
end
end
describe
"#index"
do
describe
"#index"
do
render_views
it
'returns group and project milestones to which the user belongs'
do
it
'returns group and project milestones to which the user belongs'
do
get
:index
,
format: :json
get
:index
,
format: :json
...
@@ -53,5 +55,12 @@ describe Dashboard::MilestonesController do
...
@@ -53,5 +55,12 @@ describe Dashboard::MilestonesController do
expect
(
json_response
.
map
{
|
i
|
i
[
"first_milestone"
][
"id"
]
}).
to
match_array
([
group_milestone
.
id
,
project_milestone
.
id
])
expect
(
json_response
.
map
{
|
i
|
i
[
"first_milestone"
][
"id"
]
}).
to
match_array
([
group_milestone
.
id
,
project_milestone
.
id
])
expect
(
json_response
.
map
{
|
i
|
i
[
"group_name"
]
}.
compact
).
to
match_array
(
group
.
name
)
expect
(
json_response
.
map
{
|
i
|
i
[
"group_name"
]
}.
compact
).
to
match_array
(
group
.
name
)
end
end
it
'should contain 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
\"
>3</span>"
)
expect
(
response
.
body
).
to
include
(
"Closed
\n
<span class=
\"
badge badge-pill
\"
>0</span>"
)
end
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