diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-08 21:10:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-08 21:10:02 +0300 |
commit | 375b68fe813abba5e362aa6054eae7b325e92e03 (patch) | |
tree | 3d02fc54f6c38beb92f6e592452dd5f5884fab0b /spec/uploaders | |
parent | 132b8909c81349a88317a00b94c1de97e2db4b74 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/uploaders')
-rw-r--r-- | spec/uploaders/packages/nuget/symbol_uploader_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/uploaders/packages/nuget/symbol_uploader_spec.rb b/spec/uploaders/packages/nuget/symbol_uploader_spec.rb new file mode 100644 index 00000000000..bdcb5245c1c --- /dev/null +++ b/spec/uploaders/packages/nuget/symbol_uploader_spec.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Packages::Nuget::SymbolUploader, feature_category: :package_registry do + let(:object_storage_key) { 'object/storage/key' } + let(:symbol) { build_stubbed(:nuget_symbol, object_storage_key: object_storage_key) } + + subject { described_class.new(symbol, :file) } + + describe '#store_dir' do + it 'uses the object_storage_key' do + expect(subject.store_dir).to eq(object_storage_key) + end + + context 'without the object_storage_key' do + let(:object_storage_key) { nil } + + it 'raises the error' do + expect { subject.store_dir } + .to raise_error( + described_class::ObjectNotReadyError, + 'Packages::Nuget::Symbol model not ready' + ) + end + end + end +end |