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
path: root/qa/spec
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-02-13 18:47:00 +0300
committerLin Jen-Shin <godfat@godfat.org>2018-02-13 18:47:00 +0300
commit58d1ad56f398dd847b75f54b1a84a86d6d10ba0a (patch)
tree4255beeae35bd1fa7f3980f2c4b80f72177f10aa /qa/spec
parentab4f80329c7cb60a3837737641d7d2ce238b605b (diff)
parentbf5e617a10e8df48ff78442f42f2cd6e47f59072 (diff)
Merge remote-tracking branch 'upstream/master' into qa-clone-with-deploy-key
* upstream/master: (69 commits) Change issue show page to group MRs by projects and namespaces Merge branch 'master-i18n' into 'master' Update sidekiq_style_guide.md Document all_queues.yml in sidekiq_style_guide.md Fix artifact creation Fix Error 500s creating merge requests with external issue tracker Addressed mr observations Clean new Flash() and stop disabling no-new (eslint) when possible Disable query limiting warnings for now on GitLab.com Dry up spec Add changelog entry Schedule PopulateUntrackedUploads if needed Fix orphan temp table untracked_files_for_uploads Fix last batch size equals max batch size error Revert "Merge branch 'rd-40552-gitlab-should-check-if-keys-are-valid-before-saving' into 'master'" Fix warning messages for promoting labels and milestones Fixed missing js selector for the realtime pipelines commit comp Reuse getter Add loading button for better UX Honour workhorse provided file name Fix a transient failure in db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb where symlink already exists ...
Diffstat (limited to 'qa/spec')
-rw-r--r--qa/spec/runtime/env_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/qa/spec/runtime/env_spec.rb b/qa/spec/runtime/env_spec.rb
index 103573db6be..2b6365dbc41 100644
--- a/qa/spec/runtime/env_spec.rb
+++ b/qa/spec/runtime/env_spec.rb
@@ -55,4 +55,25 @@ describe QA::Runtime::Env do
end
end
end
+
+ describe '.user_type' do
+ it 'returns standard if not defined' do
+ expect(described_class.user_type).to eq('standard')
+ end
+
+ it 'returns standard as defined' do
+ stub_env('GITLAB_USER_TYPE', 'standard')
+ expect(described_class.user_type).to eq('standard')
+ end
+
+ it 'returns ldap as defined' do
+ stub_env('GITLAB_USER_TYPE', 'ldap')
+ expect(described_class.user_type).to eq('ldap')
+ end
+
+ it 'returns an error if invalid user type' do
+ stub_env('GITLAB_USER_TYPE', 'foobar')
+ expect { described_class.user_type }.to raise_error(ArgumentError)
+ end
+ end
end