diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-02-09 16:52:20 +0100 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-02-09 16:52:20 +0100 |
commit | f86ff1b833eb04dfc66638bdff110fa7cb9b2360 (patch) | |
tree | 9b7f80b9c936ee6f977e188dc3c4a62ca809db42 /spec | |
parent | 706b101f510b9a1f5acff51bb2f1b14c018b37ce (diff) | |
parent | dd3b9feafa958742d2772078309ede027720d4c0 (diff) | |
download | gitlab-ce-f86ff1b833eb04dfc66638bdff110fa7cb9b2360.tar.gz |
Merge branch 'fix/max-attachment-size-setting-validation'
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/application_setting_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb index f4c58882757..161a32c51e6 100644 --- a/spec/models/application_setting_spec.rb +++ b/spec/models/application_setting_spec.rb @@ -66,6 +66,14 @@ describe ApplicationSetting, models: true do it { is_expected.to allow_value(http).for(:after_sign_out_path) } it { is_expected.to allow_value(https).for(:after_sign_out_path) } it { is_expected.not_to allow_value(ftp).for(:after_sign_out_path) } + + it { is_expected.to validate_presence_of(:max_attachment_size) } + + it do + is_expected.to validate_numericality_of(:max_attachment_size) + .only_integer + .is_greater_than(0) + end end context 'restricted signup domains' do |