Commit d46c8a5f authored by Serena Fang's avatar Serena Fang

Apply maintainer suggestions

parent bbb65ae6
......@@ -62,7 +62,7 @@ module EE
end
def show_minute_limit_banner?(namespace)
return false unless ::Gitlab.com? && ::Feature.enabled?(:show_minute_limit_banner)
return false unless ::Gitlab.com? && ::Feature.enabled?(:show_minute_limit_banner, namespace.root_ancestor, default_enabled: :yaml)
namespace.root_ancestor.free_plan? && !minute_limit_banner_dismissed?
end
......
......@@ -229,7 +229,7 @@ RSpec.describe EE::NamespacesHelper do
context 'on dot com' do
using RSpec::Parameterized::TableSyntax
where(:feature_flag_enabled, :free_project, :user_dismissed_banner, :should_show_banner) do
where(:feature_flag_enabled, :free_plan, :user_dismissed_banner, :should_show_banner) do
true | true | false | true
true | true | true | false
true | false | false | false
......@@ -240,7 +240,7 @@ RSpec.describe EE::NamespacesHelper do
before do
allow(Gitlab).to receive(:com?).and_return(true)
stub_feature_flags(show_minute_limit_banner: feature_flag_enabled)
allow(project.root_ancestor).to receive(:free_plan?).and_return(free_project)
allow(project.root_ancestor).to receive(:free_plan?).and_return(free_plan)
allow(helper).to receive(:user_dismissed?).with('minute_limit_banner').and_return(user_dismissed_banner)
end
......
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