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/scripts/trigger-build_spec.rb')
-rw-r--r--spec/scripts/trigger-build_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/scripts/trigger-build_spec.rb b/spec/scripts/trigger-build_spec.rb
index d3b520d385f..f46adb1a9f1 100644
--- a/spec/scripts/trigger-build_spec.rb
+++ b/spec/scripts/trigger-build_spec.rb
@@ -477,6 +477,18 @@ RSpec.describe Trigger, feature_category: :tooling do
end
end
+ describe "BRANCH_OPERATOR" do
+ before do
+ stub_env('CI_PROJECT_PATH', 'gitlab-org/cloud-native/gitlab-operator')
+ end
+
+ context 'when CI_PROJECT_PATH is gitlab-org/cloud-native/gitlab-operator' do
+ it 'sets BRANCH_OPERATOR to CI_COMMIT_REF_NAME' do
+ expect(subject.variables['BRANCH_OPERATOR']).to eq(env['CI_COMMIT_REF_NAME'])
+ end
+ end
+ end
+
describe "REVIEW_SLUG" do
before do
stub_env('CI_PROJECT_PATH', 'gitlab-org/gitlab-foss')