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