diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-06-17 12:06:48 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-06-17 12:06:48 +0200 |
commit | d9ca84015c04d8836c09c3ebb70a8240262b60e8 (patch) | |
tree | 2a67fb3dec879e29ecb8592c14acf7674e238227 /spec/lib/gitlab | |
parent | a9bd16bd0a44332133d0f9fd859d9ffaba9e262f (diff) | |
download | gitlab-ce-d9ca84015c04d8836c09c3ebb70a8240262b60e8.tar.gz |
Add first custom validator for new ci config
This follows a standard `ActiveModel` pattern of creating a custom
validators. We use `ActiveModel::EachValidator` here that reuses methods
provided by `LegacyValidationHelpers`.
We will remove `LegacyValidationHelpers` on some point in the future, at
the later stages of CI configuration refactoring. It may be possible
to rewrite custom validators to use format like:
`validates :config, array_of: String`
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r-- | spec/lib/gitlab/ci/config/node/validators/array_of_strings_validator_spec.rb | 0 |
1 files changed, 0 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/config/node/validators/array_of_strings_validator_spec.rb b/spec/lib/gitlab/ci/config/node/validators/array_of_strings_validator_spec.rb new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/spec/lib/gitlab/ci/config/node/validators/array_of_strings_validator_spec.rb |