Skip to content

Commit

Permalink
added test fail string validation if integer is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
cesine committed Apr 14, 2016
1 parent 93f9140 commit ec28a70
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/string.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ describe('string', () => {
], done);
});

it('fails on integer', (done) => {

const schema = Joi.string();
Helper.validate(schema, [
[123, false],
[0, false],
['123', true],
['0', true]
], done);
});

describe('valid()', () => {

it('validates case sensitive values', (done) => {
Expand Down

0 comments on commit ec28a70

Please sign in to comment.