Added missing unit test requested in #1772

This pull request includes @micahhausler change from #1772

The added tests will check that:
 * the old behaviour works
 * the new behaviour works
 * the behaviour which previously works but wasn't documented until the last change also works