Sha256: 63669752cbb23f78f32fb7da618e866065727caf7c08d800c0b1107f2b8ce1ac

Contents?: true

Size: 786 Bytes

Versions: 4

Compression:

Stored size: 786 Bytes

Contents

require File.dirname(__FILE__) + "/test_helper.rb"

class DreamyDnsTest < Test::Unit::TestCase

  context "Creation" do
    setup do
      @xml = <<EOF
<data>
    <account_id>8675309</account_id>
    <comment></comment>
    <editable?>0</editable?>
    <record>anessalee.net</record>
    <type>A</type>
    <value>202.22.191.4</value>
    <zone>anessalee.net</zone>
  </data>
EOF
    end

    should "create a new DNS entry from xml" do
      d = Dreamy::Dns.new_from_xml(Hpricot.XML(@xml))
      assert_equal "8675309", d.account_id
      assert_equal "", d.comment
      # assert_equal "0", d.editable
      assert_equal "anessalee.net", d.record
      assert_equal "A", d.type
      assert_equal "202.22.191.4", d.value
      assert_equal "anessalee.net", d.zone
    end
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sant0sk1-dreamy-0.1.1 test/dns_test.rb
sant0sk1-dreamy-0.1.2 test/dns_test.rb
sant0sk1-dreamy-0.2.0 test/dns_test.rb
sant0sk1-dreamy-0.2.1 test/dns_test.rb