Commit 3c486e99 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'rd-do-not-show-buy-extra-ci-minutes-for-trials' into 'master'

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

See merge request gitlab-org/gitlab-ee!11216
parents e272e7ff 9aee4203
......@@ -285,6 +285,8 @@ module EE
end
def paid_plan?
return false if trial?
!(free_plan? || early_adopter_plan?)
end
......
......@@ -3,7 +3,7 @@
.row
.col-sm-6
%strong
= _("Aditional minutes")
= _("Additional minutes")
%div
= namespace_extra_shared_runner_limits_quota(namespace)
minutes
......
......@@ -70,17 +70,20 @@ describe Namespace do
subject { namespace.paid_plan? }
where(:plan_code, :expected_result) do
described_class::FREE_PLAN | false
described_class::EARLY_ADOPTER_PLAN | false
described_class::BRONZE_PLAN | true
described_class::SILVER_PLAN | true
described_class::GOLD_PLAN | true
where(:plan_code, :trial, :expected_result) do
described_class::FREE_PLAN | false | false
described_class::EARLY_ADOPTER_PLAN | false | false
described_class::BRONZE_PLAN | false | true
described_class::SILVER_PLAN | false | 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
with_them 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
it do
......
......@@ -683,6 +683,9 @@ msgstr ""
msgid "Adding new applications is disabled in your GitLab instance. Please contact your GitLab administrator to get the permission"
msgstr ""
msgid "Additional minutes"
msgstr ""
msgid "Additional text"
msgstr ""
......@@ -692,9 +695,6 @@ msgstr ""
msgid "Adds a todo."
msgstr ""
msgid "Aditional minutes"
msgstr ""
msgid "Admin Area"
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