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/build/rules/rule/clause/exists_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/build/rules/rule/clause/exists_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/build/rules/rule/clause/exists_spec.rb b/spec/lib/gitlab/ci/build/rules/rule/clause/exists_spec.rb
new file mode 100644
index 00000000000..c016216304a
--- /dev/null
+++ b/spec/lib/gitlab/ci/build/rules/rule/clause/exists_spec.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe Gitlab::Ci::Build::Rules::Rule::Clause::Exists do
+ describe '#satisfied_by?' do
+ it_behaves_like 'a glob matching rule' do
+ let(:project) { create(:project, :custom_repo, files: files) }
+ let(:pipeline) { build(:ci_pipeline, project: project, sha: project.repository.head_commit.sha) }
+
+ subject { described_class.new(globs).satisfied_by?(pipeline, nil) }
+ end
+ end
+end