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
02126a76
Commit
02126a76
authored
Feb 16, 2021
by
Etienne Baqué
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused render_billings_gold_trial
Removed related rspec as well.
parent
f66f5b55
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
60 deletions
+0
-60
ee/app/helpers/ee/user_callouts_helper.rb
ee/app/helpers/ee/user_callouts_helper.rb
+0
-9
ee/spec/helpers/ee/user_callouts_helper_spec.rb
ee/spec/helpers/ee/user_callouts_helper_spec.rb
+0
-51
No files found.
ee/app/helpers/ee/user_callouts_helper.rb
View file @
02126a76
...
...
@@ -9,7 +9,6 @@ module EE
GEO_ENABLE_HASHED_STORAGE
=
'geo_enable_hashed_storage'
GEO_MIGRATE_HASHED_STORAGE
=
'geo_migrate_hashed_storage'
GOLD_TRIAL
=
'gold_trial'
GOLD_TRIAL_BILLINGS
=
'gold_trial_billings'
NEW_USER_SIGNUPS_CAP_REACHED
=
'new_user_signups_cap_reached'
PERSONAL_ACCESS_TOKEN_EXPIRY
=
'personal_access_token_expiry'
THREAT_MONITORING_INFO
=
'threat_monitoring_info'
...
...
@@ -63,14 +62,6 @@ module EE
render
'shared/check_recovery_settings'
end
def
render_billings_gold_trial
(
user
,
namespace
)
return
if
namespace
.
gold_plan?
return
unless
namespace
.
never_had_trial?
return
unless
show_gold_trial?
(
user
,
GOLD_TRIAL_BILLINGS
)
render
'shared/gold_trial_callout_content'
,
is_dismissable:
!
namespace
.
free_plan?
,
callout:
GOLD_TRIAL_BILLINGS
end
def
show_threat_monitoring_info?
!
user_dismissed?
(
THREAT_MONITORING_INFO
)
end
...
...
ee/spec/helpers/ee/user_callouts_helper_spec.rb
View file @
02126a76
...
...
@@ -179,57 +179,6 @@ RSpec.describe EE::UserCalloutsHelper do
end
end
describe
'#render_billings_gold_trial'
do
let
(
:namespace
)
{
create
(
:namespace
)
}
let_it_be
(
:free_plan
)
{
create
(
:free_plan
)
}
let_it_be
(
:silver_plan
)
{
create
(
:silver_plan
)
}
let_it_be
(
:gold_plan
)
{
create
(
:gold_plan
)
}
let
(
:user
)
{
namespace
.
owner
}
where
(
:never_had_trial?
,
:show_gold_trial?
,
:gold_plan?
,
:free_plan?
,
:should_render?
)
do
true
|
true
|
false
|
false
|
true
true
|
true
|
false
|
true
|
true
true
|
true
|
true
|
true
|
false
true
|
true
|
true
|
false
|
false
true
|
false
|
true
|
true
|
false
true
|
false
|
false
|
true
|
false
true
|
false
|
true
|
false
|
false
true
|
false
|
false
|
false
|
false
false
|
true
|
false
|
false
|
false
false
|
true
|
false
|
true
|
false
false
|
true
|
true
|
true
|
false
false
|
true
|
true
|
false
|
false
false
|
false
|
true
|
true
|
false
false
|
false
|
false
|
true
|
false
false
|
false
|
true
|
false
|
false
false
|
false
|
false
|
false
|
false
end
with_them
do
before
do
allow
(
helper
).
to
receive
(
:show_gold_trial?
)
{
show_gold_trial?
}
if
!
never_had_trial?
create
(
:gitlab_subscription
,
namespace:
namespace
,
hosted_plan:
free_plan
,
trial_ends_on:
Date
.
yesterday
)
elsif
gold_plan?
create
(
:gitlab_subscription
,
namespace:
namespace
,
hosted_plan:
gold_plan
)
elsif
!
free_plan?
create
(
:gitlab_subscription
,
namespace:
namespace
,
hosted_plan:
silver_plan
)
end
end
it
do
if
should_render?
expect
(
helper
).
to
receive
(
:render
).
with
(
'shared/gold_trial_callout_content'
,
is_dismissable:
!
free_plan?
,
callout:
UserCalloutsHelper
::
GOLD_TRIAL_BILLINGS
)
else
expect
(
helper
).
not_to
receive
(
:render
)
end
helper
.
render_billings_gold_trial
(
user
,
namespace
)
end
end
end
describe
'#render_account_recovery_regular_check'
do
let
(
:new_user
)
{
create
(
:user
)
}
let
(
:old_user
)
{
create
(
:user
,
created_at:
4
.
months
.
ago
)}
...
...
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