debian-mirror-gitlab/spec/helpers/components_helper_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
651 B
Ruby
Raw Normal View History

2019-12-21 20:55:43 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe ComponentsHelper do
2017-08-17 22:00:37 +05:30
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