forked from stormpath/express-stormpath
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a test for custom data on root of object
- Loading branch information
Robert
committed
Feb 3, 2017
1 parent
71b41cc
commit 3bb57c8
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: '[email protected]', | ||
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', | ||
|