summaryrefslogtreecommitdiff
path: root/spec/models/ci/variable_spec.rb
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2019-02-26 14:03:42 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2019-02-26 14:03:42 +0000
commitc9125c4786970fc3c3745c7ea7bff45ef7a62e7d (patch)
tree38bd564113590665646b974dcbdf91f51b3a4b88 /spec/models/ci/variable_spec.rb
parentc1d8f8a41042ac7abb2916206e8a411e82af442e (diff)
downloadgitlab-ce-c9125c4786970fc3c3745c7ea7bff45ef7a62e7d.tar.gz
Add Maskable concern for CI variables
This adds a concern that abstracts the concept of masking a variable, including the RegEx for validation.
Diffstat (limited to 'spec/models/ci/variable_spec.rb')
-rw-r--r--spec/models/ci/variable_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/models/ci/variable_spec.rb b/spec/models/ci/variable_spec.rb
index 875e8b2b682..02c07a2bd83 100644
--- a/spec/models/ci/variable_spec.rb
+++ b/spec/models/ci/variable_spec.rb
@@ -6,6 +6,7 @@ describe Ci::Variable do
describe 'validations' do
it { is_expected.to include_module(HasVariable) }
it { is_expected.to include_module(Presentable) }
+ it { is_expected.to include_module(Maskable) }
it { is_expected.to validate_uniqueness_of(:key).scoped_to(:project_id, :environment_scope).with_message(/\(\w+\) has already been taken/) }
end