Welcome to mirror list, hosted at ThFree Co, Russian Federation.

build_primary_xml_service_spec.rb « repository_metadata « rpm « packages « services « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9bbfa5c9863a0af07c341b7ec863807f0b03723a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true
require 'spec_helper'

RSpec.describe Packages::Rpm::RepositoryMetadata::BuildPrimaryXmlService do
  describe '#execute' do
    subject { described_class.new(data).execute }

    include_context 'with rpm package data'

    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 = subject

      required_text_only_attributes.each do |attribute|
        expect(
          result.at("//package/#{attribute}").text
        ).to eq(data[attribute])
      end
    end
  end
end