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

build_other_xml_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: 823aa18808ad3092fae88546af46515c113038c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true
require 'spec_helper'

RSpec.describe Packages::Rpm::RepositoryMetadata::BuildOtherXml do
  describe '#execute' do
    subject { described_class.new.execute }

    context "when generate empty xml" do
      let(:expected_xml) do
        <<~XML
          <?xml version="1.0" encoding="UTF-8"?>
          <otherdata xmlns="http://linux.duke.edu/metadata/other" packages="0"/>
        XML
      end

      it 'generate expected xml' do
        expect(subject).to eq(expected_xml)
      end
    end
  end
end