summaryrefslogtreecommitdiff
path: root/spec/lib/system_check/app/hashed_storage_enabled_check_spec.rb
blob: 32a2f40985849cffaccac57289fdd7009a8eddb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

require 'spec_helper'
require 'rake_helper'

RSpec.describe SystemCheck::App::HashedStorageEnabledCheck do
  before do
    silence_output
  end

  describe '#check?' do
    it 'fails when hashed storage is disabled' do
      stub_application_setting(hashed_storage_enabled: false)

      expect(subject.check?).to be_falsey
    end

    it 'succeeds when hashed storage is enabled' do
      stub_application_setting(hashed_storage_enabled: true)

      expect(subject.check?).to be_truthy
    end
  end
end