Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d46c8a5f
Commit
d46c8a5f
authored
Apr 14, 2022
by
Serena Fang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply maintainer suggestions
parent
bbb65ae6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
ee/app/helpers/ee/namespaces_helper.rb
ee/app/helpers/ee/namespaces_helper.rb
+1
-1
ee/spec/helpers/ee/namespaces_helper_spec.rb
ee/spec/helpers/ee/namespaces_helper_spec.rb
+2
-2
No files found.
ee/app/helpers/ee/namespaces_helper.rb
View file @
d46c8a5f
...
...
@@ -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
...
...
ee/spec/helpers/ee/namespaces_helper_spec.rb
View file @
d46c8a5f
...
...
@@ -229,7 +229,7 @@ RSpec.describe EE::NamespacesHelper do
context
'on dot com'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:feature_flag_enabled
,
:free_p
roject
,
:user_dismissed_banner
,
:should_show_banner
)
do
where
(
:feature_flag_enabled
,
:free_p
lan
,
: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_p
roject
)
allow
(
project
.
root_ancestor
).
to
receive
(
:free_plan?
).
and_return
(
free_p
lan
)
allow
(
helper
).
to
receive
(
:user_dismissed?
).
with
(
'minute_limit_banner'
).
and_return
(
user_dismissed_banner
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment