debian-mirror-gitlab/spec/services/packages/debian/generate_distribution_service_spec.rb

26 lines
727 B
Ruby
Raw Normal View History

2021-06-08 01:23:25 +05:30
# frozen_string_literal: true
2021-09-04 01:27:46 +05:30
2021-06-08 01:23:25 +05:30
require 'spec_helper'
RSpec.describe Packages::Debian::GenerateDistributionService do
describe '#execute' do
2021-09-04 01:27:46 +05:30
subject { described_class.new(distribution).execute }
2021-06-08 01:23:25 +05:30
2021-09-04 01:27:46 +05:30
include_context 'with published Debian package'
2021-06-08 01:23:25 +05:30
2021-09-04 01:27:46 +05:30
[:project, :group].each do |container_type|
context "for #{container_type}" do
include_context 'with Debian distribution', container_type
2021-06-08 01:23:25 +05:30
2021-09-04 01:27:46 +05:30
context 'with Debian components and architectures' do
it_behaves_like 'Generate Debian Distribution and component files'
2021-06-08 01:23:25 +05:30
end
context 'without components and architectures' do
2021-09-04 01:27:46 +05:30
it_behaves_like 'Generate minimal Debian Distribution'
2021-06-08 01:23:25 +05:30
end
end
end
end
end