Commit be326b7f authored by Krasimir Angelov's avatar Krasimir Angelov

Remove not existing feature flag from tests

Tests for `EE::SubscribableBannerHelper` were testing against feature
flag that do not exists (`subscribable_banner`). Remove this flag from
tests, and add some tests for when `subscribable_subscription_banner` is
enabled/disabled.

See https://gitlab.com/gitlab-org/gitlab/-/issues/295308.
parent e9245077
......@@ -16,13 +16,8 @@ RSpec.describe EE::SubscribableBannerHelper do
end
end
context 'when feature flag is enabled' do
let(:license) { double(:license) }
before do
stub_feature_flags(subscribable_banner: true)
end
context 'when instance variable true' do
before do
assign(:display_subscription_banner, true)
......@@ -91,16 +86,15 @@ RSpec.describe EE::SubscribableBannerHelper do
end
end
end
end
describe '#gitlab_subscription_message_or_license_message' do
subject { helper.gitlab_subscription_message_or_license_message }
let(:message) { double(:message) }
context 'when feature flag is enabled' do
context 'when subscribable_subscription_banner feature flag is enabled' do
before do
stub_feature_flags(subscribable_banner: true)
stub_feature_flags(subscribable_subscription_banner: true)
end
context 'when instance variable true' do
......@@ -201,6 +195,19 @@ RSpec.describe EE::SubscribableBannerHelper do
end
end
end
context 'when subscribable_subscription_banner feature flag is disabled' do
before do
stub_feature_flags(subscribable_subscription_banner: false)
assign(:display_subscription_banner, true)
allow(::Gitlab::CurrentSettings).to receive(:should_check_namespace_plan?).and_return(true)
end
it 'returns the license message' do
expect(helper).to receive(:license_message).and_return(message)
expect(subject).to eq(message)
end
end
end
describe '#display_subscription_banner!' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment