diff options
Diffstat (limited to 'spec/models/ci/secure_file_spec.rb')
-rw-r--r-- | spec/models/ci/secure_file_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |