Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/helpers/auth_helper_spec.rb')
-rw-r--r--spec/helpers/auth_helper_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/helpers/auth_helper_spec.rb b/spec/helpers/auth_helper_spec.rb
index cb7c670198d..9179019cd6a 100644
--- a/spec/helpers/auth_helper_spec.rb
+++ b/spec/helpers/auth_helper_spec.rb
@@ -73,12 +73,17 @@ describe AuthHelper do
describe 'enabled_button_based_providers' do
before do
- allow(helper).to receive(:auth_providers) { [:twitter, :github] }
+ allow(helper).to receive(:auth_providers) { [:twitter, :github, :google_oauth2] }
end
context 'all providers are enabled to sign in' do
it 'returns all the enabled providers from settings' do
- expect(helper.enabled_button_based_providers).to include('twitter', 'github')
+ expect(helper.enabled_button_based_providers).to include('twitter', 'github', 'google_oauth2')
+ end
+
+ it 'puts google and github in the beginning' do
+ expect(helper.enabled_button_based_providers.first).to eq('google_oauth2')
+ expect(helper.enabled_button_based_providers.second).to eq('github')
end
end