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
a94aa40d
Commit
a94aa40d
authored
Mar 26, 2021
by
Angelo Gulina
Committed by
Sean McGivern
Mar 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add licenses helper
parent
c3228bff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
ee/app/helpers/license_helper.rb
ee/app/helpers/license_helper.rb
+6
-0
ee/spec/helpers/license_helper_spec.rb
ee/spec/helpers/license_helper_spec.rb
+20
-0
No files found.
ee/app/helpers/license_helper.rb
View file @
a94aa40d
...
...
@@ -48,5 +48,11 @@ module LicenseHelper
end
end
def
cloud_license_view_data
{
current_plan_title:
current_license_title
}
end
extend
self
end
ee/spec/helpers/license_helper_spec.rb
View file @
a94aa40d
...
...
@@ -78,4 +78,24 @@ RSpec.describe LicenseHelper do
end
end
end
describe
'#cloud_license_view_data'
do
context
'when there is a current license'
do
it
'returns the data for the view'
do
custom_plan
=
'custom plan'
license
=
double
(
'License'
,
plan:
custom_plan
)
allow
(
License
).
to
receive
(
:current
).
and_return
(
license
)
expect
(
cloud_license_view_data
).
to
eq
({
current_plan_title:
'Custom Plan'
})
end
end
context
'when there is no current license'
do
it
'returns the data for the view'
do
allow
(
License
).
to
receive
(
:current
).
and_return
(
nil
)
expect
(
cloud_license_view_data
).
to
eq
({
current_plan_title:
'Core'
})
end
end
end
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