Add tests for new function error messages