Commit 156353bf authored by Colin Shea's avatar Colin Shea

test a couple more unhappy paths

we're now at 96% coverage! That's plenty enough.
parent 370e633e
......@@ -11,6 +11,10 @@ describe Zone do
subject.soa ttl: "42m"
subject.zonefile.output.must_include "42m IN SOA"
end
it "should catch typos" do
proc { subject.soa minimum_ttl: 'invalid key' }.must_raise ArgumentError
end
end
describe "a record" do
......@@ -118,6 +122,10 @@ describe Zone do
subject.srv "foo", :ldap, :tcp, 'ldap01', 389
subject.zonefile.srv.must_equal [{:class=>"IN", :name=>"_ldap._tcp.foo", :ttl=>nil, :pri=>10, :weight=>0, :host=>"ldap01", port: 389}]
end
it "should not create srv record with invalid options" do
proc { subject.srv :ldap, :tcp, 'ldap01', 389, foo: 123 }.must_raise ArgumentError
end
end
describe "ptr record" do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment