diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-26 21:07:52 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-26 21:07:52 +0000 |
commit | 03a70b84edfb86bc27f9234e1f1d157d3a33c555 (patch) | |
tree | d8df46fee3e5a97d3b9dbd7d2e69ccc9e3601de1 /spec | |
parent | 165beade336f9049f95db3944b1c5c00a1e952cf (diff) | |
download | gitlab-ce-03a70b84edfb86bc27f9234e1f1d157d3a33c555.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/application_setting_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb index 4c96b0079df..8307f91dfed 100644 --- a/spec/models/application_setting_spec.rb +++ b/spec/models/application_setting_spec.rb @@ -69,12 +69,12 @@ describe ApplicationSetting do it { is_expected.to validate_numericality_of(:snippet_size_limit).only_integer.is_greater_than(0) } it { is_expected.to validate_presence_of(:max_artifacts_size) } - it do - is_expected.to validate_numericality_of(:max_pages_size).only_integer.is_greater_than(0) + it { is_expected.to validate_numericality_of(:max_artifacts_size).only_integer.is_greater_than(0) } + it { is_expected.to validate_presence_of(:max_pages_size) } + it 'ensures max_pages_size is an integer greater than 0 (or equal to 0 to indicate unlimited/maximum)' do + is_expected.to validate_numericality_of(:max_pages_size).only_integer.is_greater_than_or_equal_to(0) .is_less_than(::Gitlab::Pages::MAX_SIZE / 1.megabyte) end - it { is_expected.to validate_numericality_of(:max_artifacts_size).only_integer.is_greater_than(0) } - it { is_expected.to validate_numericality_of(:max_pages_size).only_integer.is_greater_than(0) } it { is_expected.not_to allow_value(7).for(:minimum_password_length) } it { is_expected.not_to allow_value(129).for(:minimum_password_length) } |