summaryrefslogtreecommitdiff
path: root/spec/services/packages/debian
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/packages/debian')
-rw-r--r--spec/services/packages/debian/extract_deb_metadata_service_spec.rb2
-rw-r--r--spec/services/packages/debian/extract_metadata_service_spec.rb7
-rw-r--r--spec/services/packages/debian/parse_debian822_service_spec.rb8
-rw-r--r--spec/services/packages/debian/sign_distribution_service_spec.rb2
4 files changed, 7 insertions, 12 deletions
diff --git a/spec/services/packages/debian/extract_deb_metadata_service_spec.rb b/spec/services/packages/debian/extract_deb_metadata_service_spec.rb
index ee3f3d179dc..66a9ca5f9e0 100644
--- a/spec/services/packages/debian/extract_deb_metadata_service_spec.rb
+++ b/spec/services/packages/debian/extract_deb_metadata_service_spec.rb
@@ -31,7 +31,7 @@ RSpec.describe Packages::Debian::ExtractDebMetadataService do
let(:file_name) { 'README.md' }
it 'raise error' do
- expect {subject.execute}.to raise_error(described_class::CommandFailedError, /is not a Debian format archive/i)
+ expect { subject.execute }.to raise_error(described_class::CommandFailedError, /is not a Debian format archive/i)
end
end
end
diff --git a/spec/services/packages/debian/extract_metadata_service_spec.rb b/spec/services/packages/debian/extract_metadata_service_spec.rb
index e3911dbbfe0..02c81ad1644 100644
--- a/spec/services/packages/debian/extract_metadata_service_spec.rb
+++ b/spec/services/packages/debian/extract_metadata_service_spec.rb
@@ -11,15 +11,10 @@ RSpec.describe Packages::Debian::ExtractMetadataService do
end
RSpec.shared_examples 'Test Debian ExtractMetadata Service' do |expected_file_type, expected_architecture, expected_fields|
- it "returns file_type #{expected_file_type.inspect}" do
+ it "returns file_type #{expected_file_type.inspect}, architecture #{expected_architecture.inspect} and fields #{expected_fields.nil? ? '' : 'including '}#{expected_fields.inspect}", :aggregate_failures do
expect(subject[:file_type]).to eq(expected_file_type)
- end
-
- it "returns architecture #{expected_architecture.inspect}" do
expect(subject[:architecture]).to eq(expected_architecture)
- end
- it "returns fields #{expected_fields.nil? ? '' : 'including '}#{expected_fields.inspect}" do
if expected_fields.nil?
expect(subject[:fields]).to be_nil
else
diff --git a/spec/services/packages/debian/parse_debian822_service_spec.rb b/spec/services/packages/debian/parse_debian822_service_spec.rb
index cad4e81f350..ff146fda250 100644
--- a/spec/services/packages/debian/parse_debian822_service_spec.rb
+++ b/spec/services/packages/debian/parse_debian822_service_spec.rb
@@ -102,7 +102,7 @@ RSpec.describe Packages::Debian::ParseDebian822Service do
let(:input) { ' continuation' }
it 'raise error' do
- expect {subject.execute}.to raise_error(described_class::InvalidDebian822Error, 'Parse error. Unexpected continuation line')
+ expect { subject.execute }.to raise_error(described_class::InvalidDebian822Error, 'Parse error. Unexpected continuation line')
end
end
@@ -116,7 +116,7 @@ RSpec.describe Packages::Debian::ParseDebian822Service do
end
it 'raise error' do
- expect {subject.execute}.to raise_error(described_class::InvalidDebian822Error, "Duplicate field 'Source' in section 'Package: libsample0'")
+ expect { subject.execute }.to raise_error(described_class::InvalidDebian822Error, "Duplicate field 'Source' in section 'Package: libsample0'")
end
end
@@ -128,7 +128,7 @@ RSpec.describe Packages::Debian::ParseDebian822Service do
end
it 'raise error' do
- expect {subject.execute}.to raise_error(described_class::InvalidDebian822Error, 'Parse error on line Hello')
+ expect { subject.execute }.to raise_error(described_class::InvalidDebian822Error, 'Parse error on line Hello')
end
end
@@ -142,7 +142,7 @@ RSpec.describe Packages::Debian::ParseDebian822Service do
end
it 'raise error' do
- expect {subject.execute}.to raise_error(described_class::InvalidDebian822Error, "Duplicate section 'Package: libsample0'")
+ expect { subject.execute }.to raise_error(described_class::InvalidDebian822Error, "Duplicate section 'Package: libsample0'")
end
end
end
diff --git a/spec/services/packages/debian/sign_distribution_service_spec.rb b/spec/services/packages/debian/sign_distribution_service_spec.rb
index 2aec0e50636..fc070b6e45e 100644
--- a/spec/services/packages/debian/sign_distribution_service_spec.rb
+++ b/spec/services/packages/debian/sign_distribution_service_spec.rb
@@ -30,7 +30,7 @@ RSpec.describe Packages::Debian::SignDistributionService do
end
context 'with an existing key' do
- let!(:key) { create("debian_#{container_type}_distribution_key", distribution: distribution)}
+ let!(:key) { create("debian_#{container_type}_distribution_key", distribution: distribution) }
it 'returns the content signed', :aggregate_failures do
expect(Packages::Debian::GenerateDistributionKeyService).not_to receive(:new)