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
56eb45b7
Commit
56eb45b7
authored
Jul 08, 2021
by
Vitaly Slobodin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Danger bot complains
parent
c0b03f88
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
ee/app/assets/javascripts/subscriptions/buy_minutes/components/checkout/confirm_order.vue
...iptions/buy_minutes/components/checkout/confirm_order.vue
+0
-1
ee/spec/controllers/subscriptions_controller_spec.rb
ee/spec/controllers/subscriptions_controller_spec.rb
+18
-6
No files found.
ee/app/assets/javascripts/subscriptions/buy_minutes/components/checkout/confirm_order.vue
View file @
56eb45b7
...
...
@@ -46,7 +46,6 @@ export default {
zip_code
:
customer
.
zipCode
,
company
:
customer
.
company
,
},
selected_group
:
data
.
subscription
.
namespaceId
,
subscription
:
{
plan_id
:
data
.
selectedPlanId
,
payment_method_id
:
data
.
paymentMethod
.
id
,
...
...
ee/spec/controllers/subscriptions_controller_spec.rb
View file @
56eb45b7
...
...
@@ -67,7 +67,7 @@ RSpec.describe SubscriptionsController do
describe
'GET #buy_minutes'
do
let_it_be
(
:group
)
{
create
(
:group
)
}
subject
(
:buy_minutes
)
{
get
:buy_minutes
,
params:
{
namespace_id
:
group
.
id
}
}
subject
(
:buy_minutes
)
{
get
:buy_minutes
,
params:
{
selected_group
:
group
.
id
}
}
context
'with authenticated user'
do
before
do
...
...
@@ -76,13 +76,25 @@ RSpec.describe SubscriptionsController do
sign_in
(
user
)
end
it
{
is_expected
.
to
render_template
'layouts/checkout'
}
it
{
is_expected
.
to
render_template
:buy_minutes
}
context
'when there are groups eligible for the addon'
do
let_it_be
(
:group
)
{
create
(
:group
)
}
before
do
group
.
add_owner
(
user
)
allow_next_instance_of
(
GitlabSubscriptions
::
FilterPurchaseEligibleNamespacesService
,
user:
user
,
namespaces:
[
group
])
do
|
instance
|
allow
(
instance
).
to
receive
(
:execute
).
and_return
(
instance_double
(
ServiceResponse
,
success?:
true
,
payload:
[
group
]))
end
end
it
{
is_expected
.
to
render_template
'layouts/checkout'
}
it
{
is_expected
.
to
render_template
:buy_minutes
}
it
'assigns the eligible groups for the subscripti
on'
do
buy_minutes
it
'assigns the group for the add
on'
do
buy_minutes
expect
(
assigns
(
:group
)).
to
eq
group
expect
(
assigns
(
:group
)).
to
eq
group
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