From 69544c1ebe48f4a73fae3530bfab73378efad7a2 Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Tue, 9 Apr 2019 15:49:15 +0100 Subject: 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. --- spec/models/project_services/hipchat_service_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/models') 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 -- cgit v1.2.1