Skip to content

Commit

Permalink
[webui] Update Image#to_xml to include the description.
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Rolfe committed Oct 27, 2017
1 parent 7123efd commit c8963bc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/api/spec/models/kiwi/image_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
it { expect(subject.to_xml).to be_nil }
end

context 'with a kiwi file with packages and repositories' do
context 'with a kiwi file with packages, repositories and a description' do
let(:package) { create(:package) }
let(:kiwi_image) { Kiwi::Image.build_from_xml(kiwi_xml, 'some_md5') }
subject { Nokogiri::XML::DocumentFragment.parse(kiwi_image.to_xml) }
Expand All @@ -277,6 +277,10 @@
kiwi_image.save
end

it { expect(subject.children[2].children[1].name).to eq('description') }
it { expect(subject.children[2].children[1].children[1].name).to eq('author') }
it { expect(subject.children[2].children[1].children[3].name).to eq('contact') }
it { expect(subject.children[2].children[1].children[5].name).to eq('specification') }
it { expect(subject.children[2].children[3].name).to eq('packages') }
it { expect(subject.children[2].children[3].attributes['type'].value).to eq('image') }
it { expect(subject.children[2].children[7].name).to eq('repository') }
Expand Down

0 comments on commit c8963bc

Please sign in to comment.