Skip to content

Commit

Permalink
Add test for Volume#to_xml
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Jul 15, 2024
1 parent b073ac7 commit 4ea420c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/libvirt/models/compute/volume_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,23 @@
test('succeed') { volume.xml == new_vol.xml }
end

test('to_xml') do
test('default') do
expected = <<~VOLUME
<volume>
<name>fog_test</name>
<allocation unit="G">1</allocation>
<capacity unit="G">10</capacity>
<target>
<format type="raw"/>
<permissions>
<mode>0744</mode>
<label>virt_image_t</label>
</permissions>
</target>
</volume>
VOLUME
volume.to_xml == expected
end
end
end

0 comments on commit 4ea420c

Please sign in to comment.