Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Commit

Permalink
add a test for custom data on root of object
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert committed Feb 3, 2017
1 parent 71b41cc commit 3bb57c8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/helpers/test-validate-account.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 3bb57c8

Please sign in to comment.