unit test for invalid units handling in _make_cube

Adds a unit test to replace the test removed by your PR.