BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
175b7834
Commit
175b7834
authored
Jun 22, 2017
by
Takuya Noguchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for MilestonesHelper#milestones_filter_dropdown_path
parent
f0886918
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
milestones_helper_spec.rb
spec/helpers/milestones_helper_spec.rb
+36
-0
No files found.
spec/helpers/milestones_helper_spec.rb
View file @
175b7834
require
'spec_helper'
describe
MilestonesHelper
do
describe
'#milestones_filter_dropdown_path'
do
let
(
:project
)
{
create
(
:empty_project
)
}
let
(
:project2
)
{
create
(
:empty_project
)
}
let
(
:group
)
{
create
(
:group
)
}
context
'when @project present'
do
it
'returns project milestones JSON URL'
do
assign
(
:project
,
project
)
expect
(
helper
.
milestones_filter_dropdown_path
).
to
eq
(
namespace_project_milestones_path
(
project
.
namespace
,
project
,
:json
))
end
end
context
'when @target_project present'
do
it
'returns targeted project milestones JSON URL'
do
assign
(
:target_project
,
project2
)
expect
(
helper
.
milestones_filter_dropdown_path
).
to
eq
(
namespace_project_milestones_path
(
project2
.
namespace
,
project2
,
:json
))
end
end
context
'when @group present'
do
it
'returns group milestones JSON URL'
do
assign
(
:group
,
group
)
expect
(
helper
.
milestones_filter_dropdown_path
).
to
eq
(
group_milestones_path
(
group
,
:json
))
end
end
context
'when neither of @project/@target_project/@group present'
do
it
'returns dashboard milestones JSON URL'
do
expect
(
helper
.
milestones_filter_dropdown_path
).
to
eq
(
dashboard_milestones_path
(
:json
))
end
end
end
describe
"#milestone_date_range"
do
def
result_for
(
*
args
)
milestone_date_range
(
build
(
:milestone
,
*
args
))
...
...
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