summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/bitbucket_import
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-03-22 18:07:33 -0700
committerStan Hu <stanhu@gmail.com>2015-03-22 18:16:48 -0700
commit5cce0645b07265e3c2b991bcbff351a9acbc90d6 (patch)
treed6159107f168a25bb737903c214e106321cf7cab /spec/lib/gitlab/bitbucket_import
parentfb30039668f68834d9951746181201423fa8b269 (diff)
downloadgitlab-ce-5cce0645b07265e3c2b991bcbff351a9acbc90d6.tar.gz
Fix OAuth2 issue importing a new project from GitHub and GitLab
Closes #1268
Diffstat (limited to 'spec/lib/gitlab/bitbucket_import')
-rw-r--r--spec/lib/gitlab/bitbucket_import/client_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/lib/gitlab/bitbucket_import/client_spec.rb b/spec/lib/gitlab/bitbucket_import/client_spec.rb
new file mode 100644
index 00000000000..dd450e9967b
--- /dev/null
+++ b/spec/lib/gitlab/bitbucket_import/client_spec.rb
@@ -0,0 +1,17 @@
+require 'spec_helper'
+
+describe Gitlab::BitbucketImport::Client do
+ 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")
+ end
+
+ it 'all OAuth client options are symbols' do
+ client.consumer.options.keys.each do |key|
+ expect(key).to be_kind_of(Symbol)
+ end
+ end
+end