diff options
Diffstat (limited to 'spec/lib/system_check/app/gitlab_cable_config_exists_check_spec.rb')
-rw-r--r-- | spec/lib/system_check/app/gitlab_cable_config_exists_check_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/lib/system_check/app/gitlab_cable_config_exists_check_spec.rb b/spec/lib/system_check/app/gitlab_cable_config_exists_check_spec.rb new file mode 100644 index 00000000000..8e127bb715c --- /dev/null +++ b/spec/lib/system_check/app/gitlab_cable_config_exists_check_spec.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe SystemCheck::App::GitlabCableConfigExistsCheck, feature_category: :redis do + subject(:system_check) { described_class.new } + + describe '#check?' do + subject { system_check.check? } + + context 'when config/cable.yml exists' do + before do + allow(File).to receive(:exist?).and_return(true) + end + + it { is_expected.to eq(true) } + end + + context 'when config/cable.yml does not exist' do + before do + allow(File).to receive(:exist?).and_return(false) + end + + it { is_expected.to eq(false) } + end + end +end |