diff --git a/test/helpers/test-validate-account.js b/test/helpers/test-validate-account.js index 884e4547..e17b37f4 100644 --- a/test/helpers/test-validate-account.js +++ b/test/helpers/test-validate-account.js @@ -59,6 +59,22 @@ describe('validateAccount', function () { }); }); + it('should support custom data properties on the root object', function (done) { + var accountData = { + givenName: 'Randall', + surname: 'Degges', + email: 'randall@stormpath.com', + password: 'FASRbaBjkrqJSNVlUrV2ZyUy5iUX8UEZ3TW3nejX', + confirmPassword: 'FASRbaBjkrqJSNVlUrV2ZyUy5iUX8UEZ3TW3nejX', + color: 'purple' + }; + + helpers.validateAccount(accountData, config, function (errors) { + assert.equal(errors, null); + done(); + }); + }); + it('should return errors if errors are present', function (done) { var accountData = { givenName: 'Randall',