Sha256: 9a3cae19e23a0fa0c25647d1e2f80d7f9c9a21430f9aa2b7c138d8c34516a9d1
Contents?: true
Size: 899 Bytes
Versions: 9
Compression:
Stored size: 899 Bytes
Contents
require 'test_helper' class XmlUtilTest < Test::Unit::TestCase def test_to_xml assert_nothing_raised { record = Exlibris::Primo::Record.new(:raw_xml => "<record><control><recordid>123456</recordid></control></record>\n") assert_equal "<record><control><recordid>123456</recordid></control></record>", record.to_xml } end def test_to_hash assert_nothing_raised { record = Exlibris::Primo::Record.new(:raw_xml => "<record><control><recordid>123456</recordid></control></record>\n") assert_equal({"record"=> { "control" => { "recordid"=> "123456" } } }, record.to_hash) } end def test_to_json assert_nothing_raised { record = Exlibris::Primo::Record.new(:raw_xml => "<record><control><recordid>123456</recordid></control></record>\n") assert_equal "{\"record\":{\"control\":{\"recordid\":\"123456\"}}}", record.to_json } end end
Version data entries
9 entries across 9 versions & 1 rubygems