summaryrefslogtreecommitdiff
path: root/spec/services/packages/rpm/repository_metadata/build_primary_xml_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-17 11:33:21 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-17 11:33:21 +0000
commit7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch)
tree5bdc2229f5198d516781f8d24eace62fc7e589e9 /spec/services/packages/rpm/repository_metadata/build_primary_xml_spec.rb
parent185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff)
downloadgitlab-ce-7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0.tar.gz
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'spec/services/packages/rpm/repository_metadata/build_primary_xml_spec.rb')
-rw-r--r--spec/services/packages/rpm/repository_metadata/build_primary_xml_spec.rb35
1 files changed, 0 insertions, 35 deletions
diff --git a/spec/services/packages/rpm/repository_metadata/build_primary_xml_spec.rb b/spec/services/packages/rpm/repository_metadata/build_primary_xml_spec.rb
deleted file mode 100644
index 147d5862a71..00000000000
--- a/spec/services/packages/rpm/repository_metadata/build_primary_xml_spec.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-require 'spec_helper'
-
-RSpec.describe Packages::Rpm::RepositoryMetadata::BuildPrimaryXml do
- describe '#execute' do
- subject { described_class.new(xml: xml, data: data).execute }
-
- let(:empty_xml) do
- <<~XML
- <?xml version="1.0" encoding="UTF-8"?>
- <metadata xmlns="http://linux.duke.edu/metadata/common" xmlns:rpm="http://linux.duke.edu/metadata/rpm" packages="0"/>
- XML
- end
-
- it_behaves_like 'handling rpm xml file'
-
- context 'when updating existing xml' do
- include_context 'with rpm package data'
-
- let(:xml) { empty_xml }
- let(:data) { xml_update_params }
- let(:required_text_only_attributes) { %i[description summary arch name] }
-
- it 'adds node with required_text_only_attributes' do
- result = Nokogiri::XML::Document.parse(subject).remove_namespaces!
-
- required_text_only_attributes.each do |attribute|
- expect(
- result.at("//#{described_class::ROOT_TAG}/package/#{attribute}").text
- ).to eq(data[attribute])
- end
- end
- end
- end
-end