2020-09-02 09:10:23 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
RSpec.describe ContainerRegistryHelper do
|
2021-02-01 15:08:56 +00:00
|
|
|
describe '#container_registry_expiration_policies_throttling?' do
|
|
|
|
subject { helper.container_registry_expiration_policies_throttling? }
|
2020-09-02 09:10:23 +00:00
|
|
|
|
2022-03-09 18:08:16 +00:00
|
|
|
it { is_expected.to eq(true) }
|
2020-09-02 09:10:23 +00:00
|
|
|
|
2022-03-09 18:08:16 +00:00
|
|
|
context 'with container_registry_expiration_policies_throttling disabled' do
|
2020-09-02 09:10:23 +00:00
|
|
|
before do
|
2022-03-09 18:08:16 +00:00
|
|
|
stub_feature_flags(container_registry_expiration_policies_throttling: false)
|
2020-09-02 09:10:23 +00:00
|
|
|
end
|
|
|
|
|
2022-03-09 18:08:16 +00:00
|
|
|
it { is_expected.to eq(false) }
|
2020-09-02 09:10:23 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|