diff options
Diffstat (limited to 'spec/finders/packages/debian')
-rw-r--r-- | spec/finders/packages/debian/distributions_finder_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/finders/packages/debian/distributions_finder_spec.rb b/spec/finders/packages/debian/distributions_finder_spec.rb new file mode 100644 index 00000000000..f141b13e394 --- /dev/null +++ b/spec/finders/packages/debian/distributions_finder_spec.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Packages::Debian::DistributionsFinder do + it_behaves_like 'Debian Distributions Finder', :debian_project_distribution, true + it_behaves_like 'Debian Distributions Finder', :debian_group_distribution, false + + context 'with nil container' do + let(:service) { described_class.new(nil) } + + subject { service.execute.to_a } + + it 'raises error' do + expect { subject }.to raise_error ArgumentError, "Unexpected container type of 'NilClass'" + end + end + + context 'with unexpected container type' do + let(:service) { described_class.new(:invalid) } + + subject { service.execute.to_a } + + it 'raises error' do + expect { subject }.to raise_error ArgumentError, "Unexpected container type of 'Symbol'" + end + end +end |