diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-03-13 22:38:25 +0000 |
---|---|---|
committer | Mark Fletcher <mark@gitlab.com> | 2018-03-21 14:39:21 +0000 |
commit | 95ced3bb5fa52e166aa03ee592f63180601cbde7 (patch) | |
tree | 8e75e6ccf9a443ba004b11891b84518fd7cfe884 /spec/lib/mattermost | |
parent | 30c480c2b3f4709f592d8b095f8653df940f6845 (diff) | |
download | gitlab-ce-95ced3bb5fa52e166aa03ee592f63180601cbde7.tar.gz |
Merge branch 'fj-15329-services-callbacks-ssrf' into 'security-10-6'
Server Side Request Forgery in Services and Web Hooks
See merge request gitlab/gitlabhq!2337
Diffstat (limited to 'spec/lib/mattermost')
-rw-r--r-- | spec/lib/mattermost/command_spec.rb | 5 | ||||
-rw-r--r-- | spec/lib/mattermost/session_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/mattermost/team_spec.rb | 5 |
3 files changed, 7 insertions, 5 deletions
diff --git a/spec/lib/mattermost/command_spec.rb b/spec/lib/mattermost/command_spec.rb index 369e7b181b9..8ba15ae0f38 100644 --- a/spec/lib/mattermost/command_spec.rb +++ b/spec/lib/mattermost/command_spec.rb @@ -4,10 +4,11 @@ describe Mattermost::Command do let(:params) { { 'token' => 'token', team_id: 'abc' } } before do - Mattermost::Session.base_uri('http://mattermost.example.com') + session = Mattermost::Session.new(nil) + session.base_uri = 'http://mattermost.example.com' allow_any_instance_of(Mattermost::Client).to receive(:with_session) - .and_yield(Mattermost::Session.new(nil)) + .and_yield(session) end describe '#create' do diff --git a/spec/lib/mattermost/session_spec.rb b/spec/lib/mattermost/session_spec.rb index 3db19d06305..c855643c4d8 100644 --- a/spec/lib/mattermost/session_spec.rb +++ b/spec/lib/mattermost/session_spec.rb @@ -15,7 +15,7 @@ describe Mattermost::Session, type: :request do it { is_expected.to respond_to(:strategy) } before do - described_class.base_uri(mattermost_url) + subject.base_uri = mattermost_url end describe '#with session' do diff --git a/spec/lib/mattermost/team_spec.rb b/spec/lib/mattermost/team_spec.rb index 3c8206031cf..2cfa6802612 100644 --- a/spec/lib/mattermost/team_spec.rb +++ b/spec/lib/mattermost/team_spec.rb @@ -2,10 +2,11 @@ require 'spec_helper' describe Mattermost::Team do before do - Mattermost::Session.base_uri('http://mattermost.example.com') + session = Mattermost::Session.new(nil) + session.base_uri = 'http://mattermost.example.com' allow_any_instance_of(Mattermost::Client).to receive(:with_session) - .and_yield(Mattermost::Session.new(nil)) + .and_yield(session) end describe '#all' do |