2020-05-24 23:13:21 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
require 'rake_helper'
|
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe SystemCheck::App::HashedStorageAllProjectsCheck do
|
2020-05-24 23:13:21 +05:30
|
|
|
before do
|
|
|
|
silence_output
|
|
|
|
end
|
|
|
|
|
|
|
|
describe '#check?' do
|
|
|
|
it 'fails when at least one project is in legacy storage' do
|
|
|
|
create(:project, :legacy_storage)
|
|
|
|
|
|
|
|
expect(subject.check?).to be_falsey
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'succeeds when all projects are in hashed storage' do
|
|
|
|
create(:project)
|
|
|
|
|
|
|
|
expect(subject.check?).to be_truthy
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|