From 5b7ffe0a758eaeeccdd7b7af90355b13779083b9 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Sat, 15 Oct 2022 18:09:16 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/models/ci/secure_file_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/models') diff --git a/spec/models/ci/secure_file_spec.rb b/spec/models/ci/secure_file_spec.rb index 81caae8ac09..20f64d40865 100644 --- a/spec/models/ci/secure_file_spec.rb +++ b/spec/models/ci/secure_file_spec.rb @@ -117,6 +117,11 @@ RSpec.describe Ci::SecureFile do expect(file.metadata_parser).to be_an_instance_of(Gitlab::Ci::SecureFiles::P12) end + it 'returns an instance of Gitlab::Ci::SecureFiles::MobileProvision when a .mobileprovision file is supplied' do + file = build(:ci_secure_file, name: 'file1.mobileprovision') + expect(file.metadata_parser).to be_an_instance_of(Gitlab::Ci::SecureFiles::MobileProvision) + end + it 'returns nil when the file type is not supported by any parsers' do file = build(:ci_secure_file, name: 'file1.foo') expect(file.metadata_parser).to be nil -- cgit v1.2.3