diff --git a/doc/development/licensed_feature_availability.md b/doc/development/licensed_feature_availability.md index 377e31f6ab7b820257a601a8e072ed489532b5df..2757a0fe08a5764e7fb7e3e6dae0c533b431f2af 100644 --- a/doc/development/licensed_feature_availability.md +++ b/doc/development/licensed_feature_availability.md @@ -19,7 +19,7 @@ it should be restricted on namespace scope. 1. Add the feature symbol on `EES_FEATURES`, `EEP_FEATURES` or `EEU_FEATURES` constants in `ee/app/models/license.rb`. Note on `ee/app/models/ee/namespace.rb` that _Bronze_ GitLab.com - features maps to on-premise _EES_, _Silver_ to _EEP_ and _Gold_ to _EEU_. + features maps to on-premise _EES_, _Silver/Premium_ to _EEP_ and _Gold/Ultimate_ to _EEU_. 1. Check using: ```ruby diff --git a/ee/lib/gitlab/expiring_subscription_message.rb b/ee/lib/gitlab/expiring_subscription_message.rb index 9ea5839030412974dbe5b67991e9f711bf99f2a3..0a517ae406712d2fea6b94131266e974ac1fd212 100644 --- a/ee/lib/gitlab/expiring_subscription_message.rb +++ b/ee/lib/gitlab/expiring_subscription_message.rb @@ -104,7 +104,7 @@ def expiring_features_message case plan_name when 'Gold', 'Ultimate' _('After that, you will not be able to use merge approvals or epics as well as many security features.') - when 'Silver' + when 'Premium', 'Silver' _('After that, you will not be able to use merge approvals or epics as well as many other features.') else _('After that, you will not be able to use merge approvals or code quality as well as many other features.') diff --git a/ee/spec/features/admin/groups/admin_changes_plan_spec.rb b/ee/spec/features/admin/groups/admin_changes_plan_spec.rb index e84a36ae07cadb4b1b18a52daad51de0ebd54346..3eb42da50f1520fe0af45f027593f1bf61265bca 100644 --- a/ee/spec/features/admin/groups/admin_changes_plan_spec.rb +++ b/ee/spec/features/admin/groups/admin_changes_plan_spec.rb @@ -5,7 +5,7 @@ RSpec.describe 'Changes GL.com plan for group' do include WaitForRequests - let!(:silver_plan) { create(:silver_plan) } + let!(:premium_plan) { create(:premium_plan) } let(:admin) { create(:admin) } before do @@ -28,7 +28,7 @@ click_button('Save changes') - expect(page).to have_content('Plan: Premium (Formerly Silver)') + expect(page).to have_content('Plan: Premium') end end @@ -45,7 +45,7 @@ click_button('Save changes') - expect(page).to have_content('Plan: Premium (Formerly Silver)') + expect(page).to have_content('Plan: Premium') end end end diff --git a/ee/spec/features/billings/billing_plans_spec.rb b/ee/spec/features/billings/billing_plans_spec.rb index 9c9cd2a63bb529680ce34117bf37f7b1299f0c6a..75c6b2b016c856bba74fed9a6d80f927beb0b3a6 100644 --- a/ee/spec/features/billings/billing_plans_spec.rb +++ b/ee/spec/features/billings/billing_plans_spec.rb @@ -10,7 +10,7 @@ let(:namespace) { user.namespace } let(:free_plan) { create(:free_plan) } let(:bronze_plan) { create(:bronze_plan) } - let(:silver_plan) { create(:silver_plan) } + let(:premium_plan) { create(:premium_plan) } let(:ultimate_plan) { create(:ultimate_plan) } let(:plans_data) do Gitlab::Json.parse(File.read(Rails.root.join('ee/spec/fixtures/gitlab_com_plans.json'))).map do |data| @@ -56,7 +56,7 @@ def external_upgrade_url(namespace, plan) # see ApplicationHelper#contact_sales_url contact_sales_url = 'https://about.gitlab.com/sales' page.within('.content') do - expect(page).to have_link('Contact sales', href: %r{#{contact_sales_url}\?test=inappcontactsales(bronze|silver|gold)}) + expect(page).to have_link('Contact sales', href: %r{#{contact_sales_url}\?test=inappcontactsales(bronze|premium|gold)}) end end end @@ -187,8 +187,8 @@ def external_upgrade_url(namespace, plan) it_behaves_like 'plan with subscription table' end - context 'on silver plan' do - let(:plan) { silver_plan } + context 'on premium plan' do + let(:plan) { premium_plan } let!(:subscription) do create(:gitlab_subscription, namespace: namespace, hosted_plan: plan, seats: 15) diff --git a/ee/spec/finders/ee/projects_finder_spec.rb b/ee/spec/finders/ee/projects_finder_spec.rb index 4ab3bb1304329aa57e4635e1681f3f478f708d41..e05b51a64ced6510eaf9eddad5e53db10b845c20 100644 --- a/ee/spec/finders/ee/projects_finder_spec.rb +++ b/ee/spec/finders/ee/projects_finder_spec.rb @@ -15,7 +15,7 @@ let_it_be(:ultimate_project) { create_project(:ultimate_plan) } let_it_be(:ultimate_project2) { create_project(:ultimate_plan) } - let_it_be(:silver_project) { create_project(:silver_plan) } + let_it_be(:premium_project) { create_project(:premium_plan) } let_it_be(:no_plan_project) { create_project(nil) } context 'with ultimate plan' do @@ -25,9 +25,9 @@ end context 'with multiple plans' do - let(:plans) { %w[ultimate silver] } + let(:plans) { %w[ultimate premium] } - it { is_expected.to contain_exactly(ultimate_project, ultimate_project2, silver_project) } + it { is_expected.to contain_exactly(ultimate_project, ultimate_project2, premium_project) } end context 'with other plans' do @@ -39,13 +39,13 @@ context 'without plans' do let(:plans) { nil } - it { is_expected.to contain_exactly(ultimate_project, ultimate_project2, silver_project, no_plan_project) } + it { is_expected.to contain_exactly(ultimate_project, ultimate_project2, premium_project, no_plan_project) } end context 'with empty plans' do let(:plans) { [] } - it { is_expected.to contain_exactly(ultimate_project, ultimate_project2, silver_project, no_plan_project) } + it { is_expected.to contain_exactly(ultimate_project, ultimate_project2, premium_project, no_plan_project) } end context 'filter by aimed for deletion' do diff --git a/ee/spec/finders/groups_with_templates_finder_spec.rb b/ee/spec/finders/groups_with_templates_finder_spec.rb index d7a73574a70f246d4af3939cfc7129cd41288f91..becd46f0064e64064fe482368a9ae700ff17bcd6 100644 --- a/ee/spec/finders/groups_with_templates_finder_spec.rb +++ b/ee/spec/finders/groups_with_templates_finder_spec.rb @@ -23,7 +23,7 @@ create(:project, namespace: subgroup_2) create(:project, namespace: subgroup_3) create(:gitlab_subscription, :ultimate, namespace: group_1) - create(:gitlab_subscription, :silver, namespace: group_2) + create(:gitlab_subscription, :premium, namespace: group_2) end describe 'without group id' do @@ -36,7 +36,7 @@ allow(Gitlab::CurrentSettings).to receive(:should_check_namespace_plan?) { true } end - it 'returns groups on ultimate/silver plan' do + it 'returns groups on ultimate/premium plan' do expect(described_class.new.execute).to contain_exactly(group_1, group_2) end @@ -46,7 +46,7 @@ create(:project, namespace: subgroup_5) end - it 'returns groups on ultimate/silver plan' do + it 'returns groups on ultimate/premium plan' do expect(described_class.new.execute).to contain_exactly(group_1, group_2, subgroup_4) end end diff --git a/ee/spec/fixtures/gitlab_com_plans.json b/ee/spec/fixtures/gitlab_com_plans.json index e628fb6d829f684ac4cca486d5c36bdcc4a54295..e9005cd1e3ff12a81e2d96868dd2a90836f5bcde 100644 --- a/ee/spec/fixtures/gitlab_com_plans.json +++ b/ee/spec/fixtures/gitlab_com_plans.json @@ -94,9 +94,9 @@ "deprecated": true }, { - "id": "silver-external-id", + "id": "premium-external-id", "about_page_href": "https://about.gitlab.com/gitlab-com/", - "code": "silver", + "code": "premium", "features": [ { "highlight": false, @@ -120,7 +120,7 @@ } ], "free": false, - "name": "Silver Plan", + "name": "Premium Plan", "price_per_month": 19.0, "price_per_year": 228.0, "purchase_link": { @@ -147,7 +147,7 @@ }, { "highlight": true, - "title": "All Silver features" + "title": "All Premium features" }, { "highlight": false, diff --git a/ee/spec/frontend/subscriptions/new/store/state_spec.js b/ee/spec/frontend/subscriptions/new/store/state_spec.js index 1950c3d4a07d42826e6bcf754b4ef296d4e5ef74..4d746ea417e37f4f09082a484c3d06dac91eac9c 100644 --- a/ee/spec/frontend/subscriptions/new/store/state_spec.js +++ b/ee/spec/frontend/subscriptions/new/store/state_spec.js @@ -7,7 +7,7 @@ constants.TAX_RATE = 0; describe('projectsSelector default state', () => { const availablePlans = [ { id: 'firstPlanId', code: 'bronze', price_per_year: 48, name: 'Bronze Plan' }, - { id: 'secondPlanId', code: 'silver', price_per_year: 228, name: 'silver Plan' }, + { id: 'secondPlanId', code: 'premium', price_per_year: 228, name: 'Premium Plan' }, ]; const groupData = [ @@ -39,7 +39,7 @@ describe('projectsSelector default state', () => { it('sets the availablePlans to the provided parsed availablePlans', () => { expect(state.availablePlans).toEqual([ { value: 'firstPlanId', text: 'Bronze Plan', pricePerUserPerYear: 48 }, - { value: 'secondPlanId', text: 'Silver Plan', pricePerUserPerYear: 228 }, + { value: 'secondPlanId', text: 'Premium Plan', pricePerUserPerYear: 228 }, ]); }); diff --git a/ee/spec/helpers/billing_plans_helper_spec.rb b/ee/spec/helpers/billing_plans_helper_spec.rb index 5dfa577c37d1b9b37b2cb53c24dc3533a3ff2eee..216eb8403bd8c7fc0d4d7535abd5afffedc09ce4 100644 --- a/ee/spec/helpers/billing_plans_helper_spec.rb +++ b/ee/spec/helpers/billing_plans_helper_spec.rb @@ -156,14 +156,14 @@ context 'when plan has a valid property' do where(:plan_name, :for_free, :plan_id, :result) do - Plan::BRONZE | true | '123456789' | :upgrade_for_free - Plan::BRONZE | true | '987654321' | :no_offer - Plan::BRONZE | true | nil | :no_offer - Plan::BRONZE | false | '123456789' | :upgrade_for_offer - Plan::BRONZE | false | nil | :no_offer - Plan::BRONZE | nil | nil | :no_offer - Plan::SILVER | nil | nil | :no_offer - nil | true | nil | :no_offer + Plan::BRONZE | true | '123456789' | :upgrade_for_free + Plan::BRONZE | true | '987654321' | :no_offer + Plan::BRONZE | true | nil | :no_offer + Plan::BRONZE | false | '123456789' | :upgrade_for_offer + Plan::BRONZE | false | nil | :no_offer + Plan::BRONZE | nil | nil | :no_offer + Plan::PREMIUM | nil | nil | :no_offer + nil | true | nil | :no_offer end with_them do @@ -374,7 +374,7 @@ end describe '#billing_available_plans' do - let(:plan) { double('Plan', deprecated?: false, code: 'silver', hide_deprecated_card?: false) } + let(:plan) { double('Plan', deprecated?: false, code: 'premium', hide_deprecated_card?: false) } let(:deprecated_plan) { double('Plan', deprecated?: true, code: 'bronze', hide_deprecated_card?: false) } let(:plans_data) { [plan, deprecated_plan] } @@ -385,7 +385,7 @@ end context 'when namespace is on an active plan' do - let(:current_plan) { OpenStruct.new(code: 'silver') } + let(:current_plan) { OpenStruct.new(code: 'premium') } it 'returns plans without deprecated' do expect(helper.billing_available_plans(plans_data, nil)).to eq([plan]) @@ -410,8 +410,8 @@ 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: 'silver') } - let(:plan) { double('Plan', deprecated?: false, code: 'silver', hide_deprecated_card?: true) } + let(:current_plan) { OpenStruct.new(code: 'premium') } + let(:plan) { double('Plan', deprecated?: false, code: 'premium', hide_deprecated_card?: true) } it 'returns plans with the deprecated plan' do expect(helper.billing_available_plans(plans_data, current_plan)).to eq([plan]) @@ -435,10 +435,10 @@ end it 'breaks a tie with the current_subscription_plan attribute if multiple plans have the same code' do - other_plan = Hashie::Mash.new(current_subscription_plan: false, code: 'silver') - current_plan = Hashie::Mash.new(current_subscription_plan: true, code: 'silver') + other_plan = Hashie::Mash.new(current_subscription_plan: false, code: 'premium') + current_plan = Hashie::Mash.new(current_subscription_plan: true, code: 'premium') - expect(helper.subscription_plan_info([other_plan, current_plan], 'silver')).to eq(current_plan) + expect(helper.subscription_plan_info([other_plan, current_plan], 'premium')).to eq(current_plan) end it 'returns nil if no plan matches the code even if current_subscription_plan is true' do @@ -450,9 +450,9 @@ it 'returns the plan matching the plan code even if current_subscription_plan is false' do other_plan = Hashie::Mash.new(current_subscription_plan: false, code: 'bronze') - current_plan = Hashie::Mash.new(current_subscription_plan: false, code: 'silver') + current_plan = Hashie::Mash.new(current_subscription_plan: false, code: 'premium') - expect(helper.subscription_plan_info([other_plan, current_plan], 'silver')).to eq(current_plan) + expect(helper.subscription_plan_info([other_plan, current_plan], 'premium')).to eq(current_plan) end end end diff --git a/ee/spec/lib/ee/gitlab/application_context_spec.rb b/ee/spec/lib/ee/gitlab/application_context_spec.rb index 1a4cbf9cbca56d38a1fb94be6e518ee2231a2c2b..45b08ba3c6665337a9f47b6b32951588ce345312 100644 --- a/ee/spec/lib/ee/gitlab/application_context_spec.rb +++ b/ee/spec/lib/ee/gitlab/application_context_spec.rb @@ -28,14 +28,14 @@ def result(context) end it 'falls back to a projects namespace plan when a project is passed but no namespace' do - create(:gitlab_subscription, :silver, namespace: project.namespace) + create(:gitlab_subscription, :premium, namespace: project.namespace) project.actual_plan_name context = described_class.new(project: project) expect(result(context)) .to include(project: project.full_path, root_namespace: project.full_path_components.first, - subscription_plan: 'silver') + subscription_plan: 'premium') end end diff --git a/ee/spec/lib/gitlab/expiring_subscription_message_spec.rb b/ee/spec/lib/gitlab/expiring_subscription_message_spec.rb index 710ca498731c9681cb36a0b1018a66889db4ee7a..d82d73cb4d17383407da0c233483f990f3d3d370 100644 --- a/ee/spec/lib/gitlab/expiring_subscription_message_spec.rb +++ b/ee/spec/lib/gitlab/expiring_subscription_message_spec.rb @@ -196,10 +196,14 @@ end end - it 'has silver plan specific messaging' do - allow(subscribable).to receive(:plan).and_return('silver') + where plan: %w(silver premium) - expect(subject).to include('Your Silver subscription for No Limit Records will expire on 2020-03-09. After that, you will not be able to use merge approvals or epics as well as many other features.') + with_them do + it 'has plan specific messaging' do + allow(subscribable).to receive(:plan).and_return('premium') + + expect(subject).to include('Your Premium subscription for No Limit Records will expire on 2020-03-09. After that, you will not be able to use merge approvals or epics as well as many other features.') + end end it 'has bronze plan specific messaging' do diff --git a/ee/spec/models/ee/namespace_spec.rb b/ee/spec/models/ee/namespace_spec.rb index 0d9bcb998240e140d8acb79b91c1a206371099e2..75b0cf93615f4c638b9418d4c688e9156d2561ab 100644 --- a/ee/spec/models/ee/namespace_spec.rb +++ b/ee/spec/models/ee/namespace_spec.rb @@ -11,7 +11,7 @@ let(:default_plan) { create(:default_plan) } let(:free_plan) { create(:free_plan) } let!(:bronze_plan) { create(:bronze_plan) } - let!(:silver_plan) { create(:silver_plan) } + let!(:premium_plan) { create(:premium_plan) } let!(:ultimate_plan) { create(:ultimate_plan) } it { is_expected.to have_one(:namespace_statistics) } @@ -971,7 +971,7 @@ end context 'with other plans' do - %i[bronze_plan silver_plan].each do |plan| + %i[bronze_plan premium_plan].each do |plan| it 'includes active guest users' do create(:gitlab_subscription, namespace: group, hosted_plan: send(plan)) expect(group.billed_user_ids).to match_array([guest.id, developer.id]) @@ -1133,7 +1133,7 @@ end context 'with other plans' do - %i[bronze_plan silver_plan].each do |plan| + %i[bronze_plan premium_plan].each do |plan| it 'counts active guest users' do create(:gitlab_subscription, namespace: group, hosted_plan: send(plan)) expect(group.billable_members_count).to eq(2) diff --git a/ee/spec/models/ee/user_spec.rb b/ee/spec/models/ee/user_spec.rb index 097c6e01f364e2aea7c3e97df28b19dfd245f720..b494a2da9d2c91c411e8810fa8d8471854d9891c 100644 --- a/ee/spec/models/ee/user_spec.rb +++ b/ee/spec/models/ee/user_spec.rb @@ -513,7 +513,7 @@ allow(Gitlab::CurrentSettings).to receive(:should_check_namespace_plan?) { true } end - it 'returns groups on ultimate or silver plans' do + it 'returns groups on ultimate or premium plans' do groups = user.available_subgroups_with_custom_project_templates expect(groups.size).to eq(1) @@ -922,7 +922,7 @@ context 'when namespace is on a plan that is not free or ultimate' do before do - create(:gitlab_subscription, namespace: namespace, hosted_plan: create(:silver_plan)) + create(:gitlab_subscription, namespace: namespace, hosted_plan: create(:premium_plan)) end context 'user is a guest' do @@ -1502,7 +1502,7 @@ where(:hosted_plan, :result) do :bronze_plan | true - :silver_plan | true + :premium_plan | true :ultimate_plan | false :free_plan | false :default_plan | false @@ -1529,7 +1529,7 @@ it 'returns false when the user has multiple groups and any group has ultimate' do create(:group_with_plan, plan: :bronze_plan).add_owner(user) - create(:group_with_plan, plan: :silver_plan).add_owner(user) + create(:group_with_plan, plan: :premium_plan).add_owner(user) create(:group_with_plan, plan: :ultimate_plan).add_owner(user) user.namespace.plans.reload diff --git a/ee/spec/models/elasticsearch_indexed_namespace_spec.rb b/ee/spec/models/elasticsearch_indexed_namespace_spec.rb index fc62c7fb9e661f7389b8c061675e4a042c83ea80..59645f9b975e0ee45900fa06edcf40a89e6122cc 100644 --- a/ee/spec/models/elasticsearch_indexed_namespace_spec.rb +++ b/ee/spec/models/elasticsearch_indexed_namespace_spec.rb @@ -43,7 +43,7 @@ let_it_be(:namespaces) { create_list(:namespace, 3) } let_it_be(:subscription1) { create(:gitlab_subscription, namespace: namespaces[2]) } let_it_be(:subscription2) { create(:gitlab_subscription, namespace: namespaces[0]) } - let_it_be(:subscription3) { create(:gitlab_subscription, :silver, namespace: namespaces[1]) } + let_it_be(:subscription3) { create(:gitlab_subscription, :premium, namespace: namespaces[1]) } before do stub_ee_application_setting(elasticsearch_indexing: false) @@ -75,7 +75,7 @@ def expect_queue_to_contain(*args) expect(get_indexed_namespaces).to eq([ids[0], ids[2]]) expect_queue_to_contain(ids[2], "index") - described_class.index_first_n_namespaces_of_plan('silver', 1) + described_class.index_first_n_namespaces_of_plan('premium', 1) expect(get_indexed_namespaces).to eq([ids[0], ids[2], ids[1]]) expect_queue_to_contain(ids[1], "index") @@ -85,7 +85,7 @@ def expect_queue_to_contain(*args) describe '.unindex_last_n_namespaces_of_plan' do before do described_class.index_first_n_namespaces_of_plan('ultimate', 2) - described_class.index_first_n_namespaces_of_plan('silver', 1) + described_class.index_first_n_namespaces_of_plan('premium', 1) end it 'creates records, scoped by plan and ordered by namespace id' do @@ -100,7 +100,7 @@ def expect_queue_to_contain(*args) expect(get_indexed_namespaces).to contain_exactly(ids[0], ids[1]) expect_queue_to_contain(ids[2], "delete") - described_class.unindex_last_n_namespaces_of_plan('silver', 1) + described_class.unindex_last_n_namespaces_of_plan('premium', 1) expect(get_indexed_namespaces).to contain_exactly(ids[0]) expect_queue_to_contain(ids[1], "delete") diff --git a/ee/spec/models/gitlab_subscription_spec.rb b/ee/spec/models/gitlab_subscription_spec.rb index 15ab0ae86a97e98eaf755d0e9bfbc660cb93d1d1..d699a997e41a821356a4bde65dc147fda6c25784 100644 --- a/ee/spec/models/gitlab_subscription_spec.rb +++ b/ee/spec/models/gitlab_subscription_spec.rb @@ -5,7 +5,7 @@ RSpec.describe GitlabSubscription do using RSpec::Parameterized::TableSyntax - %i[free_plan bronze_plan silver_plan ultimate_plan].each do |plan| + %i[free_plan bronze_plan premium_plan ultimate_plan].each do |plan| let_it_be(plan) { create(plan) } end @@ -35,13 +35,13 @@ describe 'scopes' do describe '.with_hosted_plan' do let!(:ultimate_subscription) { create(:gitlab_subscription, hosted_plan: ultimate_plan) } - let!(:silver_subscription) { create(:gitlab_subscription, hosted_plan: silver_plan) } + let!(:premium_subscription) { create(:gitlab_subscription, hosted_plan: premium_plan) } let!(:trial_subscription) { create(:gitlab_subscription, hosted_plan: ultimate_plan, trial: true) } it 'scopes to the plan' do expect(described_class.with_hosted_plan('ultimate')).to contain_exactly(ultimate_subscription) - expect(described_class.with_hosted_plan('silver')).to contain_exactly(silver_subscription) + expect(described_class.with_hosted_plan('premium')).to contain_exactly(premium_subscription) expect(described_class.with_hosted_plan('bronze')).to be_empty end end @@ -102,7 +102,7 @@ end context 'with other plans' do - %w[bronze silver].each do |plan| + %w[bronze premium].each do |plan| it 'excludes these members' do gitlab_subscription.update!(plan_code: plan) @@ -121,7 +121,7 @@ end it 'always returns 1 seat' do - [bronze_plan, silver_plan, ultimate_plan].each do |plan| + [bronze_plan, premium_plan, ultimate_plan].each do |plan| gitlab_subscription.update!(hosted_plan: plan) expect(gitlab_subscription.calculate_seats_in_use).to eq(1) @@ -302,7 +302,7 @@ 'bronze' | 0 | true | false 'bronze' | 1 | true | true 'bronze' | 1 | false | false - 'silver' | 1 | true | true + 'premium' | 1 | true | true end with_them do @@ -326,7 +326,7 @@ where(:plan_name, :paid_hosted_plan, :expired, :result) do 'bronze' | true | false | true 'bronze' | true | true | false - 'silver' | true | false | true + 'premium' | true | false | true 'ultimate' | true | false | false end diff --git a/ee/spec/models/project_spec.rb b/ee/spec/models/project_spec.rb index c5b2d3a3a5bda42a4985f8ed977e33b93688b7da..20eed296a9cda6b3b08904e60eaab5af7d49eb1f 100644 --- a/ee/spec/models/project_spec.rb +++ b/ee/spec/models/project_spec.rb @@ -1496,8 +1496,8 @@ allow(License).to receive(:current).and_return(global_license) allow(global_license).to receive(:features).and_return([ :subepics, # Ultimate only - :epics, # Silver and up - :push_rules, # Silver and up + :epics, # Premium and up + :push_rules, # Premium and up :audit_events, # Bronze and up :geo # Global feature, should not be checked at namespace level ]) @@ -1518,10 +1518,10 @@ end end - context 'when silver' do - let(:plan_license) { :silver } + context 'when premium' do + let(:plan_license) { :premium } - it 'filters for silver features' do + it 'filters for premium features' do is_expected.to contain_exactly(:push_rules, :audit_events, :geo, :epics) end end diff --git a/ee/spec/models/push_rule_spec.rb b/ee/spec/models/push_rule_spec.rb index 1f856d006df53c00bb4192bfeed6bcc17846b0c4..d59ff618672be275bd3be3c8f34757a5b1fcf8e1 100644 --- a/ee/spec/models/push_rule_spec.rb +++ b/ee/spec/models/push_rule_spec.rb @@ -298,8 +298,8 @@ it_behaves_like 'an unavailable push_rule' end - context 'with a Silver plan' do - let(:plan) { :silver } + context 'with a Premium plan' do + let(:plan) { :premium } it_behaves_like 'an available push_rule' end diff --git a/ee/spec/policies/group_policy_spec.rb b/ee/spec/policies/group_policy_spec.rb index 2af312f401a235a192ad2e8ed15000e85ee7b275..7b995e6b0cac83d6f9833d82392723af25aeff09 100644 --- a/ee/spec/policies/group_policy_spec.rb +++ b/ee/spec/policies/group_policy_spec.rb @@ -409,7 +409,7 @@ def stub_group_saml_config(enabled) before_all do create(:license, plan: License::ULTIMATE_PLAN) - create(:gitlab_subscription, :silver, namespace: group) + create(:gitlab_subscription, :premium, namespace: group) end context 'without an enabled SAML provider' do @@ -1284,7 +1284,7 @@ def stub_group_saml_config(enabled) end it_behaves_like 'model with wiki policies' do - let_it_be_with_refind(:container) { create(:group_with_plan, plan: :silver_plan) } + let_it_be_with_refind(:container) { create(:group_with_plan, plan: :premium_plan) } let_it_be(:user) { owner } before_all do diff --git a/ee/spec/requests/api/namespaces_spec.rb b/ee/spec/requests/api/namespaces_spec.rb index 1461da320e6907fb5a342b2480690fa6d4680847..92a2e83bd417079b30685232e8f039168eeb552f 100644 --- a/ee/spec/requests/api/namespaces_spec.rb +++ b/ee/spec/requests/api/namespaces_spec.rb @@ -99,9 +99,9 @@ end end - context 'when requesting silver plan' do + context 'when requesting premium plan' do it 'counts guest members' do - get api("/namespaces?requested_hosted_plan=silver", user) + get api("/namespaces?requested_hosted_plan=premium", user) expect(json_response.first['billable_members_count']).to eq(3) end @@ -392,11 +392,11 @@ def do_get(current_user) get api("/namespaces/#{namespace.id}/gitlab_subscription", current_user) end - let_it_be(:silver_plan) { create(:silver_plan) } + let_it_be(:premium_plan) { create(:premium_plan) } let_it_be(:owner) { create(:user) } let_it_be(:developer) { create(:user) } let_it_be(:namespace) { create(:group) } - let_it_be(:gitlab_subscription) { create(:gitlab_subscription, hosted_plan: silver_plan, namespace: namespace) } + let_it_be(:gitlab_subscription) { create(:gitlab_subscription, hosted_plan: premium_plan, namespace: namespace) } before do namespace.add_owner(owner) @@ -429,8 +429,8 @@ def do_get(current_user) expect(json_response.keys).to match_array(%w[plan usage billing]) expect(json_response['plan'].keys).to match_array(%w[name code trial upgradable auto_renew]) - expect(json_response['plan']['name']).to eq('Silver') - expect(json_response['plan']['code']).to eq('silver') + expect(json_response['plan']['name']).to eq('Premium') + expect(json_response['plan']['code']).to eq('premium') expect(json_response['plan']['trial']).to eq(false) expect(json_response['plan']['upgradable']).to eq(true) expect(json_response['usage'].keys).to match_array(%w[seats_in_subscription seats_in_use max_seats_used seats_owed]) @@ -444,14 +444,14 @@ def do_put(namespace_id, current_user, payload) put api("/namespaces/#{namespace_id}/gitlab_subscription", current_user), params: payload end - let_it_be(:silver_plan) { create(:silver_plan) } + let_it_be(:premium_plan) { create(:premium_plan) } let_it_be(:namespace) { create(:group, name: 'test.test-group.22') } let_it_be(:gitlab_subscription) { create(:gitlab_subscription, namespace: namespace) } let(:params) do { seats: 150, - plan_code: 'silver', + plan_code: 'premium', start_date: '01/01/2018', end_date: '01/01/2019' } @@ -499,8 +499,8 @@ def do_put(namespace_id, current_user, payload) expect(response).to have_gitlab_http_status(:ok) expect(gitlab_subscription.reload.seats).to eq(150) expect(gitlab_subscription.max_seats_used).to eq(0) - expect(gitlab_subscription.plan_name).to eq('silver') - expect(gitlab_subscription.plan_title).to eq('Silver') + expect(gitlab_subscription.plan_name).to eq('premium') + expect(gitlab_subscription.plan_title).to eq('Premium') end it 'is successful using full_path when namespace path contains dots' do diff --git a/ee/spec/services/dashboard/projects/list_service_spec.rb b/ee/spec/services/dashboard/projects/list_service_spec.rb index d0e6063899e8303f4a8d21c519b6a65dd4c897e9..9704ef7ca6e6d11ea0f885f9b4165d19e00dcfab 100644 --- a/ee/spec/services/dashboard/projects/list_service_spec.rb +++ b/ee/spec/services/dashboard/projects/list_service_spec.rb @@ -94,11 +94,11 @@ where(:check_namespace_plan, :plan, :available) do true | :gold | true - true | :silver | true + true | :premium | true true | :ultimate | true true | nil | false false | :gold | true - false | :silver | true + false | :premium | true false | :ultimate | true false | nil | true end diff --git a/ee/spec/support/shared_examples/features/ultimate_trial_callout_shared_examples.rb b/ee/spec/support/shared_examples/features/ultimate_trial_callout_shared_examples.rb index 67050c02d325768491a41b01e97a73f4d37161fe..974934f1ee2dbc85a6b0b71b8467ea78c47704cf 100644 --- a/ee/spec/support/shared_examples/features/ultimate_trial_callout_shared_examples.rb +++ b/ee/spec/support/shared_examples/features/ultimate_trial_callout_shared_examples.rb @@ -41,7 +41,7 @@ it 'hides promotion callout if a trial is active' do allow_any_instance_of(EE::DashboardHelper).to receive(:user_default_dashboard?).and_return(true) - group = create(:group_with_plan, name: 'trial group', plan: :silver_plan, trial_ends_on: 1.year.from_now) + group = create(:group_with_plan, name: 'trial group', plan: :premium_plan, trial_ends_on: 1.year.from_now) group.add_owner(user) visit page_path @@ -81,9 +81,9 @@ end context "on a plan that isn't ultimate", :js do - let(:plans) { { bronze: create(:bronze_plan), silver: create(:silver_plan) } } + let(:plans) { { bronze: create(:bronze_plan), premium: create(:premium_plan) } } - where(case_names: ->(plan_type) {"like #{plan_type}"}, plan_type: [:bronze, :silver]) + where(case_names: ->(plan_type) {"like #{plan_type}"}, plan_type: [:bronze, :premium]) with_them do let(:plan) { plans[plan_type] } diff --git a/ee/spec/views/shared/billings/_eoa_bronze_plan_banner.html.haml_spec.rb b/ee/spec/views/shared/billings/_eoa_bronze_plan_banner.html.haml_spec.rb index 05f5e7468d0c83c18ec1ecd529978db095282f0f..1e1cce64e652a20f8f8b6553a4538eb27011c2e6 100644 --- a/ee/spec/views/shared/billings/_eoa_bronze_plan_banner.html.haml_spec.rb +++ b/ee/spec/views/shared/billings/_eoa_bronze_plan_banner.html.haml_spec.rb @@ -53,7 +53,7 @@ shared_examples 'with a different plan than Bronze' do before do - allow(namespace).to receive(:actual_plan_name).and_return(::Plan::SILVER) + allow(namespace).to receive(:actual_plan_name).and_return(::Plan::PREMIUM) end it 'does not display the banner' do diff --git a/ee/spec/views/shared/billings/_trial_status.html.haml_spec.rb b/ee/spec/views/shared/billings/_trial_status.html.haml_spec.rb index 89564741b2a1f56c8e829c72ba86d09be86a0845..0742b18da3d6fb78dd2321b795311b868078f6af 100644 --- a/ee/spec/views/shared/billings/_trial_status.html.haml_spec.rb +++ b/ee/spec/views/shared/billings/_trial_status.html.haml_spec.rb @@ -26,7 +26,7 @@ let(:trial) { true } context 'with a ultimate trial' do - let(:plan) { create(:ultimate_plan, title: 'Ultimate') } + let(:plan) { create(:ultimate_plan) } it 'displays expiry date and Ultimate' do render 'shared/billings/trial_status', namespace: group @@ -35,13 +35,13 @@ end end - context 'with a silver trial' do - let(:plan) { create(:gold_plan, title: 'Silver') } + context 'with a premium trial' do + let(:plan) { create(:premium_plan) } - it 'displays expiry date and Silver' do + it 'displays expiry date and Premium' do render 'shared/billings/trial_status', namespace: group - expect(rendered).to have_content("Your GitLab.com Silver trial will expire after #{trial_ends_on}. You can retain access to the Silver features by upgrading below.") + expect(rendered).to have_content("Your GitLab.com Premium trial will expire after #{trial_ends_on}. You can retain access to the Premium features by upgrading below.") end end end diff --git a/ee/spec/workers/elastic_namespace_rollout_worker_spec.rb b/ee/spec/workers/elastic_namespace_rollout_worker_spec.rb index 4fdd90b63928b88f4e401bbff2df044566efe821..bf5dc3ea6dc4b0aab0d6d15b0b18ce94856bba3d 100644 --- a/ee/spec/workers/elastic_namespace_rollout_worker_spec.rb +++ b/ee/spec/workers/elastic_namespace_rollout_worker_spec.rb @@ -56,18 +56,18 @@ def get_namespace_ids(plan, count) it 'distinguishes different plans' do # Rollout subject.perform('ultimate', 50, ROLLOUT) - subject.perform('silver', 25, ROLLOUT) + subject.perform('premium', 25, ROLLOUT) expect( ElasticsearchIndexedNamespace.pluck(:namespace_id) ).to contain_exactly( *get_namespace_ids(:ultimate, 2), - *get_namespace_ids(:silver, 1) + *get_namespace_ids(:premium, 1) ) # Rollback subject.perform('ultimate', 25, ROLLBACK) - subject.perform('silver', 0, ROLLBACK) + subject.perform('premium', 0, ROLLBACK) expect( ElasticsearchIndexedNamespace.pluck(:namespace_id)