summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/bitbucket_import
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-08 16:49:01 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-08 16:50:05 +0200
commit13d941e185c3ca1e9ad54c97f878e9cfdd32e5aa (patch)
tree9fdbc38329627a7ba3e3f36ba5313cfe80cdb4e9 /spec/lib/gitlab/bitbucket_import
parent722211cddfaeba38f678cc523755af1ce645cb5a (diff)
downloadgitlab-ce-13d941e185c3ca1e9ad54c97f878e9cfdd32e5aa.tar.gz
Make Omniauth providers specs to not modify global configuration
Diffstat (limited to 'spec/lib/gitlab/bitbucket_import')
-rw-r--r--spec/lib/gitlab/bitbucket_import/client_spec.rb4
-rw-r--r--spec/lib/gitlab/bitbucket_import/importer_spec.rb4
2 files changed, 6 insertions, 2 deletions
diff --git a/spec/lib/gitlab/bitbucket_import/client_spec.rb b/spec/lib/gitlab/bitbucket_import/client_spec.rb
index 7718689e6d4..760d66a1488 100644
--- a/spec/lib/gitlab/bitbucket_import/client_spec.rb
+++ b/spec/lib/gitlab/bitbucket_import/client_spec.rb
@@ -1,12 +1,14 @@
require 'spec_helper'
describe Gitlab::BitbucketImport::Client, lib: true do
+ include ImportSpecHelper
+
let(:token) { '123456' }
let(:secret) { 'secret' }
let(:client) { Gitlab::BitbucketImport::Client.new(token, secret) }
before do
- Gitlab.config.omniauth.providers << OpenStruct.new(app_id: "asd123", app_secret: "asd123", name: "bitbucket")
+ stub_omniauth_provider('bitbucket')
end
it 'all OAuth client options are symbols' do
diff --git a/spec/lib/gitlab/bitbucket_import/importer_spec.rb b/spec/lib/gitlab/bitbucket_import/importer_spec.rb
index 1a833f255a5..aa00f32becb 100644
--- a/spec/lib/gitlab/bitbucket_import/importer_spec.rb
+++ b/spec/lib/gitlab/bitbucket_import/importer_spec.rb
@@ -1,8 +1,10 @@
require 'spec_helper'
describe Gitlab::BitbucketImport::Importer, lib: true do
+ include ImportSpecHelper
+
before do
- Gitlab.config.omniauth.providers << OpenStruct.new(app_id: "asd123", app_secret: "asd123", name: "bitbucket")
+ stub_omniauth_provider('bitbucket')
end
let(:statuses) do