menu: Add tests

Close #585