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
fc69d1cf
Commit
fc69d1cf
authored
Oct 08, 2019
by
Etienne Baqué
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed urls for merge_requests and issues
parent
656981e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
32 deletions
+2
-32
app/helpers/releases_helper.rb
app/helpers/releases_helper.rb
+1
-17
spec/helpers/releases_helper_spec.rb
spec/helpers/releases_helper_spec.rb
+1
-15
No files found.
app/helpers/releases_helper.rb
View file @
fc69d1cf
...
...
@@ -12,27 +12,11 @@ module ReleasesHelper
help_page_path
(
DOCUMENTATION_PATH
)
end
def
url_for_merge_requests
project_merge_requests_url
(
@project
,
params_for_issue_and_mr_paths
)
end
def
url_for_issues
project_issues_url
(
@project
,
params_for_issue_and_mr_paths
)
end
def
data_for_releases_page
{
project_id:
@project
.
id
,
illustration_path:
illustration
,
documentation_path:
help_page
,
merge_requests_url:
url_for_merge_requests
,
issues_url:
url_for_issues
documentation_path:
help_page
}
end
private
def
params_for_issue_and_mr_paths
{
scope:
'all'
,
state:
'opened'
}
end
end
spec/helpers/releases_helper_spec.rb
View file @
fc69d1cf
...
...
@@ -22,23 +22,9 @@ describe ReleasesHelper do
helper
.
instance_variable_set
(
:@project
,
project
)
end
describe
'#url_for_merge_requests'
do
it
'returns the the correct link with the correct parameters'
do
path
=
"
#{
project
.
group
.
path
}
/
#{
project
.
path
}
/merge_requests?scope=all&state=opened"
expect
(
helper
.
url_for_merge_requests
).
to
include
(
path
)
end
end
describe
'#url_for_issues'
do
it
'returns the the correct link with the correct parameters'
do
path
=
"
#{
project
.
group
.
path
}
/
#{
project
.
path
}
/issues?scope=all&state=opened"
expect
(
helper
.
url_for_issues
).
to
include
(
path
)
end
end
describe
'#data_for_releases_page'
do
it
'has the needed data to display release blocks'
do
keys
=
%i(project_id illustration_path documentation_path
merge_requests_url issues_url
)
keys
=
%i(project_id illustration_path documentation_path)
expect
(
helper
.
data_for_releases_page
.
keys
).
to
eq
(
keys
)
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