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
2f0a7088
Commit
2f0a7088
authored
Jun 26, 2017
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rm use of deprecated webmock api in teamcity_service_spec
parent
7ef3cf64
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
spec/models/project_services/teamcity_service_spec.rb
spec/models/project_services/teamcity_service_spec.rb
+4
-2
No files found.
spec/models/project_services/teamcity_service_spec.rb
View file @
2f0a7088
...
...
@@ -205,10 +205,12 @@ describe TeamcityService, models: true, caching: true do
end
def
stub_request
(
status:
200
,
body:
nil
,
build_status:
'success'
)
teamcity_full_url
=
'http://mic:password@gitlab.com/teamcity/httpAuth/app/rest/builds/branch:unspecified:any,number:123'
teamcity_full_url
=
'http://gitlab.com/teamcity/httpAuth/app/rest/builds/branch:unspecified:any,number:123'
auth
=
%w(mic password)
body
||=
%Q({"build":{"status":"
#{
build_status
}
","id":"666"}})
WebMock
.
stub_request
(
:get
,
teamcity_full_url
).
to_return
(
WebMock
.
stub_request
(
:get
,
teamcity_full_url
).
with
(
basic_auth:
auth
).
to_return
(
status:
status
,
headers:
{
'Content-Type'
=>
'application/json'
},
body:
body
...
...
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