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.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/dhcpv6/modifiers_test.go b/dhcpv6/modifiers_test.go
index d904ca1..2179aaa 100644
--- a/dhcpv6/modifiers_test.go
+++ b/dhcpv6/modifiers_test.go
@@ -37,16 +37,12 @@ func TestWithRequestedOptions(t *testing.T) {
// Check if ORO is created when no ORO present
m, err := NewMessage(WithRequestedOptions(OptionClientID))
require.NoError(t, err)
- opt := m.GetOneOption(OptionORO)
- require.NotNil(t, opt)
- oro := opt.(*OptRequestedOption)
- require.ElementsMatch(t, oro.RequestedOptions(), []OptionCode{OptionClientID})
+ oro := m.Options.RequestedOptions()
+ require.ElementsMatch(t, oro, OptionCodes{OptionClientID})
// Check if already set options are preserved
WithRequestedOptions(OptionServerID)(m)
- opt = m.GetOneOption(OptionORO)
- require.NotNil(t, opt)
- oro = opt.(*OptRequestedOption)
- require.ElementsMatch(t, oro.RequestedOptions(), []OptionCode{OptionClientID, OptionServerID})
+ oro = m.Options.RequestedOptions()
+ require.ElementsMatch(t, oro, OptionCodes{OptionClientID, OptionServerID})
}
func TestWithIANA(t *testing.T) {