diff --git a/app/models/plan.rb b/app/models/plan.rb index f3ef04315f8..e16ecb4c629 100644 --- a/app/models/plan.rb +++ b/app/models/plan.rb @@ -14,7 +14,7 @@ class Plan < ApplicationRecord Gitlab::SafeRequestStore.fetch(:plan_default) do # find_by allows us to find object (cheaply) against replica DB # safe_find_or_create_by does stick to primary DB - find_by(name: DEFAULT) || safe_find_or_create_by(name: DEFAULT) + find_by(name: DEFAULT) || safe_find_or_create_by(name: DEFAULT) { |plan| plan.title = DEFAULT.titleize } end end diff --git a/doc/user/application_security/security_dashboard/index.md b/doc/user/application_security/security_dashboard/index.md index 076272d8334..9728b12d785 100644 --- a/doc/user/application_security/security_dashboard/index.md +++ b/doc/user/application_security/security_dashboard/index.md @@ -76,7 +76,7 @@ CSV file containing details of the resources scanned. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/285477) in GitLab 13.11, date range slider to visualize data between given dates. A project's Security Dashboard displays a chart with the total number of vulnerabilities -over time with up to 365 days of historical data. Data is refreshed daily at 1:15am GMT. By default, +over time with up to 365 days of historical data. Data is refreshed daily at 1:15am UTC. By default, it shows statistics for all vulnerability severities. To access the dashboard, from your project's home page go to **Security & Compliance > Security Dashboard**. diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_lfs_over_http_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_lfs_over_http_spec.rb index e4a492d3487..5b9ae30860f 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_lfs_over_http_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_lfs_over_http_spec.rb @@ -3,7 +3,7 @@ module QA RSpec.describe 'Create' do describe 'Push mirror a repository over HTTP' do - it 'configures and syncs LFS objects for a (push) mirrored repository', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1075' do + it 'configures and syncs LFS objects for a (push) mirrored repository', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1075', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/334461', type: :bug } do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.perform(&:sign_in_using_credentials) diff --git a/spec/models/plan_spec.rb b/spec/models/plan_spec.rb index 490c6b1bbf7..73e88a17e24 100644 --- a/spec/models/plan_spec.rb +++ b/spec/models/plan_spec.rb @@ -15,6 +15,29 @@ RSpec.describe Plan do end end + describe '#default' do + context 'when default plan exists' do + let!(:default_plan) { create(:default_plan) } + + it 'returns default plan' do + expect(described_class.default).to eq(default_plan) + end + end + + context 'when default plan does not exist' do + it 'creates default plan' do + expect { described_class.default }.to change { Plan.count }.by(1) + end + + it 'creates plan with correct attributes' do + plan = described_class.default + + expect(plan.name).to eq(Plan::DEFAULT) + expect(plan.title).to eq(Plan::DEFAULT.titleize) + end + end + end + context 'when updating plan limits' do let(:plan) { described_class.default }