summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrasimir Angelov <kangelov@gitlab.com>2019-06-06 23:20:26 +1200
committerKrasimir Angelov <kangelov@gitlab.com>2019-06-06 23:22:50 +1200
commit280ac894d203a040c49cc191038fa4c51eb4e174 (patch)
tree554847c1177b8996784a54d3ad3d3b1d139fda40
parent52673a916df0f759262afa1aaa230f7d62efd554 (diff)
downloadgitlab-ce-280ac894d203a040c49cc191038fa4c51eb4e174.tar.gz
Reformat ProjectCiCdSetting validations specs
-rw-r--r--spec/models/project_ci_cd_setting_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/models/project_ci_cd_setting_spec.rb b/spec/models/project_ci_cd_setting_spec.rb
index c5a4c242b70..f596cee81dc 100644
--- a/spec/models/project_ci_cd_setting_spec.rb
+++ b/spec/models/project_ci_cd_setting_spec.rb
@@ -23,7 +23,13 @@ describe ProjectCiCdSetting do
end
describe 'validations' do
- it { is_expected.to validate_numericality_of(:default_git_depth).only_integer.is_greater_than_or_equal_to(0).is_less_than_or_equal_to(1000).allow_nil }
+ it 'validates default_git_depth is between 0 and 1000 or nil' do
+ expect(subject).to validate_numericality_of(:default_git_depth)
+ .only_integer
+ .is_greater_than_or_equal_to(0)
+ .is_less_than_or_equal_to(1000)
+ .allow_nil
+ end
end
describe '#default_git_depth' do