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