diff options
author | http://jneen.net/ <jneen@jneen.net> | 2017-06-27 03:59:45 +0300 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2017-06-27 04:00:01 +0300 |
commit | 2f0a7088d33a1630c3e54812d10219b75cdf7bc4 (patch) | |
tree | 3e68f6c4f844a92900af8344eecd091b7db52298 /spec/models/project_services/teamcity_service_spec.rb | |
parent | 7ef3cf64d6d6af9941401af748274677ff3af15d (diff) |
rm use of deprecated webmock api in teamcity_service_spec
Diffstat (limited to 'spec/models/project_services/teamcity_service_spec.rb')
-rw-r--r-- | spec/models/project_services/teamcity_service_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/models/project_services/teamcity_service_spec.rb b/spec/models/project_services/teamcity_service_spec.rb index 7349eb4149a..6b004098510 100644 --- a/spec/models/project_services/teamcity_service_spec.rb +++ b/spec/models/project_services/teamcity_service_spec.rb @@ -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 |