diff options
author | Valery Sizov <valery@gitlab.com> | 2017-08-01 16:04:35 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-08-04 12:22:10 +0300 |
commit | 26d15a89dd4602b1d80d65b29fd48e79696dfb2c (patch) | |
tree | f068f19cf4c64407f2867ab888fe512fef87d34f /spec/lib | |
parent | dbadf5a57660bea6edf38597af17a32094d5fe1f (diff) |
Fix Mattermost integration
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/mattermost/session_spec.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/lib/mattermost/session_spec.rb b/spec/lib/mattermost/session_spec.rb index be3908e8f6a..3db19d06305 100644 --- a/spec/lib/mattermost/session_spec.rb +++ b/spec/lib/mattermost/session_spec.rb @@ -20,9 +20,10 @@ describe Mattermost::Session, type: :request do describe '#with session' do let(:location) { 'http://location.tld' } + let(:cookie_header) {'MMOAUTH=taskik8az7rq8k6rkpuas7htia; Path=/;'} let!(:stub) do WebMock.stub_request(:get, "#{mattermost_url}/api/v3/oauth/gitlab/login") - .to_return(headers: { 'location' => location }, status: 307) + .to_return(headers: { 'location' => location, 'Set-Cookie' => cookie_header }, status: 307) end context 'without oauth uri' do @@ -34,9 +35,9 @@ describe Mattermost::Session, type: :request do context 'with oauth_uri' do let!(:doorkeeper) do Doorkeeper::Application.create( - name: "GitLab Mattermost", + name: 'GitLab Mattermost', redirect_uri: "#{mattermost_url}/signup/gitlab/complete\n#{mattermost_url}/login/gitlab/complete", - scopes: "") + scopes: '') end context 'without token_uri' do |