diff options
author | Chris Wright <chris@dxw.com> | 2016-08-30 23:44:30 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-11-07 18:15:43 +0300 |
commit | 16b0723a7ce709437084c12647e59b3a73479ddf (patch) | |
tree | a419356d6a83874ab86e8af35b95f990de52851c /spec | |
parent | ce03eba57993fb0846c3a164b3eb757dd0a4e0a3 (diff) |
Use the Gitlab Workhorse HTTP header in the admin dashboard
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/components_helper_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/helpers/components_helper_spec.rb b/spec/helpers/components_helper_spec.rb new file mode 100644 index 00000000000..94a59193be8 --- /dev/null +++ b/spec/helpers/components_helper_spec.rb @@ -0,0 +1,21 @@ +require 'spec_helper' + +describe ComponentsHelper do + describe '#gitlab_workhorse_version' do + context 'without a Gitlab-Workhorse header' do + it 'shows the version from Gitlab::Workhorse.version' do + expect(helper.gitlab_workhorse_version).to eq Gitlab::Workhorse.version + end + end + + context 'with a Gitlab-Workhorse header' do + before do + helper.request.headers['Gitlab-Workhorse'] = '42.42.0-rc3' + end + + it 'shows the actual GitLab Workhorse version currently in use' do + expect(helper.gitlab_workhorse_version).to eq '42.42.0' + end + end + end +end |