diff --git a/changelogs/unreleased/fix-sm-37559-pipeline-triggered-through-api-not-showing-trigger-variables.yml b/changelogs/unreleased/fix-sm-37559-pipeline-triggered-through-api-not-showing-trigger-variables.yml
new file mode 100644
index 0000000000000000000000000000000000000000..8aae0f6f5b623cf5584fe5123c4c24408e6cc489
--- /dev/null
+++ b/changelogs/unreleased/fix-sm-37559-pipeline-triggered-through-api-not-showing-trigger-variables.yml
@@ -0,0 +1,6 @@
+---
+title: Fix Pipeline Triggers to show triggered label and predefined variables (e.g.
+  CI_PIPELINE_TRIGGERED)
+merge_request: 14244
+author:
+type: fixed
diff --git a/spec/services/ci/pipeline_trigger_service_spec.rb b/spec/services/ci/pipeline_trigger_service_spec.rb
index a19b54327ec2e981990a74f86a48006c657cebac..f4ff818c4795e54ad542f38cf2851ef9deb60f45 100644
--- a/spec/services/ci/pipeline_trigger_service_spec.rb
+++ b/spec/services/ci/pipeline_trigger_service_spec.rb
@@ -34,7 +34,7 @@ describe Ci::PipelineTriggerService do
           expect(result[:pipeline].ref).to eq('master')
           expect(result[:pipeline].project).to eq(project)
           expect(result[:pipeline].user).to eq(trigger.owner)
-          expect([result[:pipeline].trigger_requests.last])
+          expect(result[:pipeline].trigger_requests.to_a)
             .to eq(result[:pipeline].builds.map(&:trigger_request).uniq)
           expect(result[:status]).to eq(:success)
         end