Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-02-09 18:52:20 +0300
committerDouwe Maan <douwe@selenight.nl>2016-02-09 18:52:20 +0300
commitf86ff1b833eb04dfc66638bdff110fa7cb9b2360 (patch)
tree9b7f80b9c936ee6f977e188dc3c4a62ca809db42 /spec
parent706b101f510b9a1f5acff51bb2f1b14c018b37ce (diff)
parentdd3b9feafa958742d2772078309ede027720d4c0 (diff)
Merge branch 'fix/max-attachment-size-setting-validation'
Diffstat (limited to 'spec')
-rw-r--r--spec/models/application_setting_spec.rb8
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