diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /spec/models/project_setting_spec.rb | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'spec/models/project_setting_spec.rb')
-rw-r--r-- | spec/models/project_setting_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/models/project_setting_spec.rb b/spec/models/project_setting_spec.rb index 5730ca58e9e..94a2e2fe3f9 100644 --- a/spec/models/project_setting_spec.rb +++ b/spec/models/project_setting_spec.rb @@ -6,6 +6,10 @@ RSpec.describe ProjectSetting, type: :model do using RSpec::Parameterized::TableSyntax it { is_expected.to belong_to(:project) } + describe 'default values' do + it { expect(subject.legacy_open_source_license_available).to be_truthy } + end + describe 'scopes' do let_it_be(:project_1) { create(:project) } let_it_be(:project_2) { create(:project) } @@ -20,6 +24,7 @@ RSpec.describe ProjectSetting, type: :model do describe 'validations' do it { is_expected.not_to allow_value(nil).for(:target_platforms) } it { is_expected.to allow_value([]).for(:target_platforms) } + it { is_expected.to validate_length_of(:issue_branch_template).is_at_most(255) } it { is_expected.not_to allow_value(nil).for(:suggested_reviewers_enabled) } it { is_expected.to allow_value(true).for(:suggested_reviewers_enabled) } @@ -70,7 +75,7 @@ RSpec.describe ProjectSetting, type: :model do describe '#show_diff_preview_in_email?' do context 'when a project is a top-level namespace' do - let(:project_settings ) { create(:project_setting, show_diff_preview_in_email: false) } + let(:project_settings) { create(:project_setting, show_diff_preview_in_email: false) } let(:project) { create(:project, project_setting: project_settings) } context 'when show_diff_preview_in_email is disabled' do @@ -80,7 +85,7 @@ RSpec.describe ProjectSetting, type: :model do end context 'when show_diff_preview_in_email is enabled' do - let(:project_settings ) { create(:project_setting, show_diff_preview_in_email: true) } + let(:project_settings) { create(:project_setting, show_diff_preview_in_email: true) } it 'returns true' do settings = create(:project_setting, show_diff_preview_in_email: true) |