Skip to content
Permalink
Browse files

test: update tests for validation

  • Loading branch information
eduardoboucas committed Jan 24, 2019
1 parent 64569fc commit 51b9823d0b37f96474d9d505e7b341d534f8d96d
Showing with 6 additions and 3 deletions.
  1. +6 −3 test/acceptance/validation.js
@@ -87,7 +87,8 @@ describe('Validation', function () {
res.body.should.be.json
res.body.success.should.be.false
res.body.errors[0].field.should.equal('fieldMinLength')
res.body.errors[0].message.should.equal('is too short')
res.body.errors[0].code.should.equal('ERROR_MIN_LENGTH')
res.body.errors[0].message.should.be.instanceOf(String)

done()
})
@@ -124,7 +125,8 @@ describe('Validation', function () {
res.body.should.be.json
res.body.success.should.be.false
res.body.errors[0].field.should.equal('fieldMaxLength')
res.body.errors[0].message.should.equal('is too long')
res.body.errors[0].code.should.equal('ERROR_MAX_LENGTH')
res.body.errors[0].message.should.be.instanceOf(String)

done()
})
@@ -161,7 +163,8 @@ describe('Validation', function () {
res.body.should.be.json
res.body.success.should.be.false
res.body.errors[0].field.should.equal('fieldRegex')
res.body.errors[0].message.should.equal('should match the pattern ^q+$')
res.body.errors[0].code.should.equal('ERROR_REGEX')
res.body.errors[0].message.should.be.instanceOf(String)

done()
})

0 comments on commit 51b9823

Please sign in to comment.
You can’t perform that action at this time.