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
34c2165f
Commit
34c2165f
authored
Nov 16, 2021
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '344279-billing-openstruct-fix' into 'master'
Fix OpenStruct use See merge request gitlab-org/gitlab!74415
parents
cb673f18
29afe4ac
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
.rubocop_manual_todo.yml
.rubocop_manual_todo.yml
+0
-1
ee/spec/helpers/billing_plans_helper_spec.rb
ee/spec/helpers/billing_plans_helper_spec.rb
+8
-8
No files found.
.rubocop_manual_todo.yml
View file @
34c2165f
...
...
@@ -2558,7 +2558,6 @@ Style/OpenStructUse:
-
'
ee/spec/graphql/ee/resolvers/board_lists_resolver_spec.rb'
-
'
ee/spec/graphql/mutations/merge_requests/accept_spec.rb'
-
'
ee/spec/graphql/resolvers/board_groupings/epics_resolvers_spec.rb'
-
'
ee/spec/helpers/billing_plans_helper_spec.rb'
-
'
ee/spec/helpers/ee/blob_helper_spec.rb'
-
'
ee/spec/lib/gitlab/auth/group_saml/failure_handler_spec.rb'
-
'
ee/spec/lib/gitlab/legacy_github_import/project_creator_spec.rb'
...
...
ee/spec/helpers/billing_plans_helper_spec.rb
View file @
34c2165f
...
...
@@ -14,7 +14,7 @@ RSpec.describe BillingPlansHelper, :saas do
let
(
:refresh_seats_href
)
{
helper
.
refresh_seats_group_billings_url
(
group
)
}
let
(
:plan
)
do
OpenStruct
.
new
(
id:
'external-paid-plan-hash-code'
,
name:
'Bronze Plan'
)
double
(
'plan'
,
id:
'external-paid-plan-hash-code'
,
name:
'Bronze Plan'
)
end
context
'when group and plan with ID present'
do
...
...
@@ -92,7 +92,7 @@ RSpec.describe BillingPlansHelper, :saas do
end
context
'when plan with ID not present'
do
let
(
:plan
)
{
OpenStruct
.
new
(
id:
nil
,
name:
'Bronze Plan'
)
}
let
(
:plan
)
{
double
(
'plan'
,
id:
nil
,
name:
'Bronze Plan'
)
}
let
(
:base_attrs
)
do
{
...
...
@@ -217,7 +217,7 @@ RSpec.describe BillingPlansHelper, :saas do
describe
'#upgrade_offer_type'
do
using
RSpec
::
Parameterized
::
TableSyntax
let
(
:plan
)
{
OpenStruct
.
new
(
{
id:
'123456789'
})
}
let
(
:plan
)
{
double
(
'plan'
,
{
id:
'123456789'
})
}
context
'when plan has a valid property'
do
where
(
:plan_name
,
:for_free
,
:plan_id
,
:result
)
do
...
...
@@ -233,7 +233,7 @@ RSpec.describe BillingPlansHelper, :saas do
with_them
do
let
(
:namespace
)
do
OpenStruct
.
new
(
double
(
'plan'
,
{
actual_plan_name:
plan_name
,
id:
'000000000'
...
...
@@ -462,7 +462,7 @@ RSpec.describe BillingPlansHelper, :saas do
end
context
'when namespace is on an active plan'
do
let
(
:current_plan
)
{
OpenStruct
.
new
(
code:
'premium'
)
}
let
(
:current_plan
)
{
double
(
'plan'
,
code:
'premium'
)
}
it
'returns plans without deprecated'
do
expect
(
helper
.
billing_available_plans
(
plans_data
,
nil
)).
to
eq
([
plan
])
...
...
@@ -470,7 +470,7 @@ RSpec.describe BillingPlansHelper, :saas do
end
context
'when namespace is on a deprecated plan'
do
let
(
:current_plan
)
{
OpenStruct
.
new
(
code:
'bronze'
)
}
let
(
:current_plan
)
{
double
(
'plan'
,
code:
'bronze'
)
}
it
'returns plans with a deprecated plan'
do
expect
(
helper
.
billing_available_plans
(
plans_data
,
current_plan
)).
to
eq
(
plans_data
)
...
...
@@ -478,7 +478,7 @@ RSpec.describe BillingPlansHelper, :saas do
end
context
'when namespace is on a deprecated plan that has hide_deprecated_card set to true'
do
let
(
:current_plan
)
{
OpenStruct
.
new
(
code:
'bronze'
)
}
let
(
:current_plan
)
{
double
(
'plan'
,
code:
'bronze'
)
}
let
(
:deprecated_plan
)
{
double
(
'Plan'
,
deprecated?:
true
,
code:
'bronze'
,
hide_deprecated_card?:
true
)
}
it
'returns plans without the deprecated plan'
do
...
...
@@ -487,7 +487,7 @@ RSpec.describe BillingPlansHelper, :saas do
end
context
'when namespace is on a plan that has hide_deprecated_card set to true, but deprecated? is false'
do
let
(
:current_plan
)
{
OpenStruct
.
new
(
code:
'premium'
)
}
let
(
:current_plan
)
{
double
(
'plan'
,
code:
'premium'
)
}
let
(
:plan
)
{
double
(
'Plan'
,
deprecated?:
false
,
code:
'premium'
,
hide_deprecated_card?:
true
)
}
it
'returns plans with the deprecated plan'
do
...
...
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