diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-08-25 12:01:59 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-08-25 12:01:59 +0200 |
commit | 946e8d3a93eb8c9e30d1f3baa3b5b28e6c06fbc1 (patch) | |
tree | ead419feb38ea2a22cb6278411f4af70420bf112 | |
parent | a061a2461a05200ab534d382b67e1b9099128478 (diff) | |
download | gitlab-ce-946e8d3a93eb8c9e30d1f3baa3b5b28e6c06fbc1.tar.gz |
Use only/except policy that returns an array
-rw-r--r-- | lib/gitlab/ci/config/entry/policy.rb | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/config/entry/policy_spec.rb | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/lib/gitlab/ci/config/entry/policy.rb b/lib/gitlab/ci/config/entry/policy.rb index 41a3737b34a..495822e9f5a 100644 --- a/lib/gitlab/ci/config/entry/policy.rb +++ b/lib/gitlab/ci/config/entry/policy.rb @@ -15,10 +15,6 @@ module Gitlab validations do validates :config, array_of_strings_or_regexps: true end - - def value - { refs: @config } - end end class ExpressionsPolicy < Entry::Node diff --git a/spec/lib/gitlab/ci/config/entry/policy_spec.rb b/spec/lib/gitlab/ci/config/entry/policy_spec.rb index 740b95427d3..7f842c4b81b 100644 --- a/spec/lib/gitlab/ci/config/entry/policy_spec.rb +++ b/spec/lib/gitlab/ci/config/entry/policy_spec.rb @@ -17,7 +17,7 @@ describe Gitlab::Ci::Config::Entry::Policy do describe '#value' do it 'returns key value' do - expect(entry.value).to eq(refs: config) + expect(entry.value).to eq config end end end |