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
90720ed1
Commit
90720ed1
authored
Mar 17, 2021
by
Vitaly Slobodin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant is_group
parent
5231718e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
+15
-12
ee/app/assets/javascripts/billings/subscriptions/index.js
ee/app/assets/javascripts/billings/subscriptions/index.js
+0
-3
ee/app/helpers/billing_plans_helper.rb
ee/app/helpers/billing_plans_helper.rb
+0
-1
ee/spec/helpers/billing_plans_helper_spec.rb
ee/spec/helpers/billing_plans_helper_spec.rb
+15
-8
No files found.
ee/app/assets/javascripts/billings/subscriptions/index.js
View file @
90720ed1
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
{
parseBoolean
}
from
'
~/lib/utils/common_utils
'
;
import
SubscriptionApp
from
'
./components/app.vue
'
;
import
SubscriptionApp
from
'
./components/app.vue
'
;
import
initialStore
from
'
./store
'
;
import
initialStore
from
'
./store
'
;
...
@@ -17,7 +16,6 @@ export default (containerId = 'js-billing-plans') => {
...
@@ -17,7 +16,6 @@ export default (containerId = 'js-billing-plans') => {
namespaceId
,
namespaceId
,
namespaceName
,
namespaceName
,
addSeatsHref
,
addSeatsHref
,
isGroup
,
planUpgradeHref
,
planUpgradeHref
,
planRenewHref
,
planRenewHref
,
customerPortalUrl
,
customerPortalUrl
,
...
@@ -32,7 +30,6 @@ export default (containerId = 'js-billing-plans') => {
...
@@ -32,7 +30,6 @@ export default (containerId = 'js-billing-plans') => {
namespaceId
,
namespaceId
,
namespaceName
,
namespaceName
,
addSeatsHref
,
addSeatsHref
,
isGroup
:
parseBoolean
(
isGroup
),
planUpgradeHref
,
planUpgradeHref
,
planRenewHref
,
planRenewHref
,
customerPortalUrl
,
customerPortalUrl
,
...
...
ee/app/helpers/billing_plans_helper.rb
View file @
90720ed1
...
@@ -40,7 +40,6 @@ module BillingPlansHelper
...
@@ -40,7 +40,6 @@ module BillingPlansHelper
{
{
namespace_id:
namespace
.
id
,
namespace_id:
namespace
.
id
,
namespace_name:
namespace
.
name
,
namespace_name:
namespace
.
name
,
is_group:
namespace
.
group?
.
to_s
,
add_seats_href:
add_seats_url
(
namespace
),
add_seats_href:
add_seats_url
(
namespace
),
plan_upgrade_href:
plan_upgrade_url
(
namespace
,
plan
),
plan_upgrade_href:
plan_upgrade_url
(
namespace
,
plan
),
plan_renew_href:
plan_renew_url
(
namespace
),
plan_renew_href:
plan_renew_url
(
namespace
),
...
...
ee/spec/helpers/billing_plans_helper_spec.rb
View file @
90720ed1
...
@@ -21,7 +21,6 @@ RSpec.describe BillingPlansHelper do
...
@@ -21,7 +21,6 @@ RSpec.describe BillingPlansHelper do
expect
(
helper
.
subscription_plan_data_attributes
(
group
,
plan
))
expect
(
helper
.
subscription_plan_data_attributes
(
group
,
plan
))
.
to
eq
(
namespace_id:
group
.
id
,
.
to
eq
(
namespace_id:
group
.
id
,
namespace_name:
group
.
name
,
namespace_name:
group
.
name
,
is_group:
"true"
,
add_seats_href:
add_seats_href
,
add_seats_href:
add_seats_href
,
plan_upgrade_href:
upgrade_href
,
plan_upgrade_href:
upgrade_href
,
plan_renew_href:
renew_href
,
plan_renew_href:
renew_href
,
...
@@ -51,7 +50,6 @@ RSpec.describe BillingPlansHelper do
...
@@ -51,7 +50,6 @@ RSpec.describe BillingPlansHelper do
.
to
eq
(
add_seats_href:
add_seats_href
,
.
to
eq
(
add_seats_href:
add_seats_href
,
billable_seats_href:
billable_seats_href
,
billable_seats_href:
billable_seats_href
,
customer_portal_url:
customer_portal_url
,
customer_portal_url:
customer_portal_url
,
is_group:
"true"
,
namespace_id:
nil
,
namespace_id:
nil
,
namespace_name:
group
.
name
,
namespace_name:
group
.
name
,
plan_renew_href:
renew_href
,
plan_renew_href:
renew_href
,
...
@@ -71,7 +69,6 @@ RSpec.describe BillingPlansHelper do
...
@@ -71,7 +69,6 @@ RSpec.describe BillingPlansHelper do
expect
(
helper
.
subscription_plan_data_attributes
(
group
,
plan
))
expect
(
helper
.
subscription_plan_data_attributes
(
group
,
plan
))
.
to
eq
(
namespace_id:
group
.
id
,
.
to
eq
(
namespace_id:
group
.
id
,
namespace_name:
group
.
name
,
namespace_name:
group
.
name
,
is_group:
"true"
,
customer_portal_url:
customer_portal_url
,
customer_portal_url:
customer_portal_url
,
billable_seats_href:
billable_seats_href
,
billable_seats_href:
billable_seats_href
,
add_seats_href:
add_seats_href
,
add_seats_href:
add_seats_href
,
...
@@ -81,13 +78,23 @@ RSpec.describe BillingPlansHelper do
...
@@ -81,13 +78,23 @@ RSpec.describe BillingPlansHelper do
end
end
end
end
context
'when namespace is passed in'
do
context
'with different namespaces'
do
it
'returns false for is_group'
do
subject
{
helper
.
subscription_plan_data_attributes
(
namespace
,
plan
)
}
namespace
=
build
(
:namespace
)
result
=
helper
.
subscription_plan_data_attributes
(
namespace
,
plan
)
context
'with namespace'
do
let
(
:namespace
)
{
build
(
:namespace
)
}
expect
(
result
).
to
include
(
is_group:
"false"
)
it
'does not return billable_seats_href'
do
expect
(
subject
).
not_to
include
(
billable_seats_href:
helper
.
group_seat_usage_path
(
namespace
))
end
end
context
'with group'
do
let
(
:namespace
)
{
build
(
:group
)
}
it
'returns billable_seats_href for group'
do
expect
(
subject
).
to
include
(
billable_seats_href:
helper
.
group_seat_usage_path
(
namespace
))
end
end
end
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