Commit 9aee4203 authored by Rubén Dávila's avatar Rubén Dávila Committed by Douwe Maan

Don't show Buy Extra CI Minutes button when Group is on trial

parent e272e7ff
...@@ -285,6 +285,8 @@ module EE ...@@ -285,6 +285,8 @@ module EE
end end
def paid_plan? def paid_plan?
return false if trial?
!(free_plan? || early_adopter_plan?) !(free_plan? || early_adopter_plan?)
end end
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.row .row
.col-sm-6 .col-sm-6
%strong %strong
= _("Aditional minutes") = _("Additional minutes")
%div %div
= namespace_extra_shared_runner_limits_quota(namespace) = namespace_extra_shared_runner_limits_quota(namespace)
minutes minutes
......
...@@ -70,17 +70,20 @@ describe Namespace do ...@@ -70,17 +70,20 @@ describe Namespace do
subject { namespace.paid_plan? } subject { namespace.paid_plan? }
where(:plan_code, :expected_result) do where(:plan_code, :trial, :expected_result) do
described_class::FREE_PLAN | false described_class::FREE_PLAN | false | false
described_class::EARLY_ADOPTER_PLAN | false described_class::EARLY_ADOPTER_PLAN | false | false
described_class::BRONZE_PLAN | true described_class::BRONZE_PLAN | false | true
described_class::SILVER_PLAN | true described_class::SILVER_PLAN | false | true
described_class::GOLD_PLAN | true described_class::GOLD_PLAN | false | true
described_class::BRONZE_PLAN | true | false
described_class::SILVER_PLAN | true | false
described_class::GOLD_PLAN | true | false
end end
with_them do with_them do
before do before do
namespace.update!(gitlab_subscription_attributes: { hosted_plan: Plan.find_by_name(plan_code) }) namespace.update!(gitlab_subscription_attributes: { trial: trial, hosted_plan: Plan.find_by_name(plan_code) })
end end
it do it do
......
...@@ -683,6 +683,9 @@ msgstr "" ...@@ -683,6 +683,9 @@ msgstr ""
msgid "Adding new applications is disabled in your GitLab instance. Please contact your GitLab administrator to get the permission" msgid "Adding new applications is disabled in your GitLab instance. Please contact your GitLab administrator to get the permission"
msgstr "" msgstr ""
msgid "Additional minutes"
msgstr ""
msgid "Additional text" msgid "Additional text"
msgstr "" msgstr ""
...@@ -692,9 +695,6 @@ msgstr "" ...@@ -692,9 +695,6 @@ msgstr ""
msgid "Adds a todo." msgid "Adds a todo."
msgstr "" msgstr ""
msgid "Aditional minutes"
msgstr ""
msgid "Admin Area" msgid "Admin Area"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment