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
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/ci/config_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/config_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/config_spec.rb b/spec/lib/gitlab/ci/config_spec.rb
index 5eb04d969eb..055114769ea 100644
--- a/spec/lib/gitlab/ci/config_spec.rb
+++ b/spec/lib/gitlab/ci/config_spec.rb
@@ -872,4 +872,21 @@ RSpec.describe Gitlab::Ci::Config do
end
end
end
+
+ describe '#workflow_rules' do
+ subject(:workflow_rules) { config.workflow_rules }
+
+ let(:yml) do
+ <<-EOS
+ workflow:
+ rules:
+ - if: $CI_COMMIT_REF_NAME == "master"
+
+ rspec:
+ script: exit 0
+ EOS
+ end
+
+ it { is_expected.to eq([{ if: '$CI_COMMIT_REF_NAME == "master"' }]) }
+ end
end