summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/modifiers_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6/modifiers_test.go')
-rw-r--r--dhcpv6/modifiers_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/dhcpv6/modifiers_test.go b/dhcpv6/modifiers_test.go
index 324c425..dfef08c 100644
--- a/dhcpv6/modifiers_test.go
+++ b/dhcpv6/modifiers_test.go
@@ -95,3 +95,13 @@ func TestWithDomainSearchList(t *testing.T) {
require.Equal(t, "slackware.it", labels[0])
require.Equal(t, "dhcp.slackware.it", labels[1])
}
+
+func TestWithFQDN(t *testing.T) {
+ var d Message
+ WithFQDN(4, "cnos.localhost")(&d)
+ require.Equal(t, 1, len(d.Options))
+ ofqdn := d.Options[0].(*OptFQDN)
+ require.Equal(t, OptionFQDN, ofqdn.Code())
+ require.Equal(t, uint8(4), ofqdn.Flags)
+ require.Equal(t, "cnos.localhost", ofqdn.DomainName)
+}