Spring cleaning of the menu code

This commit is contained in:
Bjørn Erik Pedersen
2016-03-23 00:29:39 +01:00
parent 4f00f1c94f
commit dc7d8a9eac
4 changed files with 65 additions and 46 deletions

View File

@@ -600,8 +600,8 @@ func TestHopefullyUniqueID(t *testing.T) {
func TestAddMenuEntryChild(t *testing.T) {
root := &MenuEntry{Weight: 1}
root.AddChild(&MenuEntry{Weight: 2})
root.AddChild(&MenuEntry{Weight: 1})
root.addChild(&MenuEntry{Weight: 2})
root.addChild(&MenuEntry{Weight: 1})
assert.Equal(t, 2, len(root.Children))
assert.Equal(t, 1, root.Children[0].Weight)
}