summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-04-09 15:49:15 +0100
committerSean McGivern <sean@gitlab.com>2019-04-10 12:58:18 +0100
commit69544c1ebe48f4a73fae3530bfab73378efad7a2 (patch)
tree32ab2b48e8b0ed23cd4ecc9526ff34c562a2a9e9
parent38d8616e4da3b95023cf717b4e8c17c240aa3e68 (diff)
downloadgitlab-ce-69544c1ebe48f4a73fae3530bfab73378efad7a2.tar.gz
Fix UrlBlocker spec
The newer version of HTTParty we now use will try harder to get a valid URL out of a relative one. Unfortunately, when there's no room (as was the case in this spec), the relative URL begins with `//`, which is actually a protocol-relative URL, not a simple path. Adding a room - which will always be the case in 'real life' - fixes this.
-rw-r--r--spec/models/project_services/hipchat_service_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/project_services/hipchat_service_spec.rb b/spec/models/project_services/hipchat_service_spec.rb
index b0fd2ceead0..23b65400ce6 100644
--- a/spec/models/project_services/hipchat_service_spec.rb
+++ b/spec/models/project_services/hipchat_service_spec.rb
@@ -391,7 +391,7 @@ describe HipchatService do
context 'with UrlBlocker' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
- let(:hipchat) { described_class.new(project: project) }
+ let(:hipchat) { create(:hipchat_service, project: project, properties: { room: 'test' }) }
let(:push_sample_data) { Gitlab::DataBuilder::Push.build_sample(project, user) }
describe '#execute' do