Sha256: 0dfbde684bfe7d9acc727e3529b21a2ea14c846ea1a531a74af30673dede849d

Contents?: true

Size: 602 Bytes

Versions: 1

Compression:

Stored size: 602 Bytes

Contents

require 'tinydns/record'

describe TinyDNS::Record do
  it "to_str" do
    @record = TinyDNS::Record.new(
      :type => '=',
      :name => 'example.com',
      :value => '1.2.3.4',
      :ttl => "3600"
    )
    @record.to_str.should eql("=example.com:1.2.3.4:3600")
  end

  it "types" do
    TinyDNS::Record.new(:type => '=').type.should eql(:a)
    TinyDNS::Record.new(:type => 'C').type.should eql(:cname)
    TinyDNS::Record.new(:type => '@').type.should eql(:mx)
    TinyDNS::Record.new(:type => '.').type.should eql(:soa)
    TinyDNS::Record.new(:type => "'").type.should eql(:text)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tinydns-data-0.0.2 spec/tinydns/record_spec.rb