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
f1d32896
Commit
f1d32896
authored
Jun 13, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.com:subscribers/gitlab-ee
parents
aff9dadf
bb5581b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletion
+30
-1
app/helpers/merge_requests_helper.rb
app/helpers/merge_requests_helper.rb
+8
-1
spec/helpers/merge_request_helper_spec.rb
spec/helpers/merge_request_helper_spec.rb
+22
-0
No files found.
app/helpers/merge_requests_helper.rb
View file @
f1d32896
...
...
@@ -32,7 +32,14 @@ module MergeRequestsHelper
end
def
ci_build_details_path
merge_request
merge_request
.
source_project
.
ci_service
.
build_page
(
merge_request
.
last_commit
.
sha
)
build_url
=
merge_request
.
source_project
.
ci_service
.
build_page
(
merge_request
.
last_commit
.
sha
)
parsed_url
=
URI
.
parse
(
build_url
)
unless
parsed_url
.
userinfo
.
blank?
parsed_url
.
userinfo
=
''
end
parsed_url
.
to_s
end
def
merge_path_description
(
merge_request
,
separator
)
...
...
spec/helpers/merge_request_helper_spec.rb
0 → 100644
View file @
f1d32896
require
"spec_helper"
describe
MergeRequestsHelper
do
let
(
:project
)
{
create
:project
}
let
(
:merge_request
)
{
MergeRequest
.
new
}
let
(
:ci_service
)
{
CiService
.
new
}
let
(
:last_commit
)
{
Commit
.
new
({})
}
before
do
merge_request
.
stub
(
:source_project
)
{
project
}
merge_request
.
stub
(
:last_commit
)
{
last_commit
}
project
.
stub
(
:ci_service
)
{
ci_service
}
last_commit
.
stub
(
:sha
)
{
'12d65c'
}
end
describe
:ci_build_details_path
do
it
'does not include api credentials in a link'
do
ci_service
.
stub
(
:build_page
)
{
"http://secretuser:secretpass@jenkins.example.com:8888/job/test1/scm/bySHA1/12d65c"
}
expect
(
ci_build_details_path
(
merge_request
)).
to_not
match
(
"secret"
)
end
end
end
\ No newline at end of file
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