Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-06-24 21:07:51 +00:00
parent ff8299c65d
commit 95a48f11db
4 changed files with 26 additions and 3 deletions

View File

@ -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

View File

@ -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**.

View File

@ -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)

View File

@ -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 }