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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
09008026
Commit
09008026
authored
Dec 21, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move `ci_build_details_path` helper spec to correct location
Also, make it not fail.
parent
f8986e4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
22 deletions
+20
-22
spec/helpers/merge_request_helper_spec.rb
spec/helpers/merge_request_helper_spec.rb
+0
-22
spec/helpers/merge_requests_helper_spec.rb
spec/helpers/merge_requests_helper_spec.rb
+20
-0
No files found.
spec/helpers/merge_request_helper_spec.rb
deleted
100644 → 0
View file @
f8986e4b
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
spec/helpers/merge_requests_helper_spec.rb
View file @
09008026
require
'spec_helper'
require
'spec_helper'
describe
MergeRequestsHelper
do
describe
MergeRequestsHelper
do
describe
'ci_build_details_path'
do
let
(
:project
)
{
create
:project
}
let
(
:merge_request
)
{
MergeRequest
.
new
}
let
(
:ci_service
)
{
CiService
.
new
}
let
(
:last_commit
)
{
Ci
::
Commit
.
new
({})
}
before
do
allow
(
merge_request
).
to
receive
(
:source_project
).
and_return
(
project
)
allow
(
merge_request
).
to
receive
(
:last_commit
).
and_return
(
last_commit
)
allow
(
project
).
to
receive
(
:ci_service
).
and_return
(
ci_service
)
allow
(
last_commit
).
to
receive
(
:sha
).
and_return
(
'12d65c'
)
end
it
'does not include api credentials in a link'
do
allow
(
ci_service
).
to
receive
(
:build_page
).
and_return
(
"http://secretuser:secretpass@jenkins.example.com:8888/job/test1/scm/bySHA1/12d65c"
)
expect
(
helper
.
ci_build_details_path
(
merge_request
)).
to_not
match
(
"secret"
)
end
end
describe
'#issues_sentence'
do
describe
'#issues_sentence'
do
subject
{
issues_sentence
(
issues
)
}
subject
{
issues_sentence
(
issues
)
}
let
(
:issues
)
do
let
(
:issues
)
do
...
...
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