Skip to content

Commit

Permalink
Relax startPhoneVerification validations
Browse files Browse the repository at this point in the history
  • Loading branch information
ruimarinho committed Aug 30, 2019
1 parent 93a2898 commit 442dfad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/client.js
Expand Up @@ -550,8 +550,8 @@ export default class Client {
.then(parseResponse)
.tap(response => {
assert(response, {
carrier: [is.required(), is.string()],
is_cellphone: [is.required(), is.boolean()],
carrier: is.nullOrString(),
is_cellphone: is.boolean(),
is_ported: is.boolean(),
message: [is.required(), is.string()]
});
Expand Down
3 changes: 1 addition & 2 deletions test/client_test.js
Expand Up @@ -197,7 +197,6 @@ describe('Client', () => {
e.should.be.instanceOf(AssertionFailedError);

e.errors.message.show().assert.should.equal('HaveProperty');
e.errors.is_cellphone.show().assert.should.equal('HaveProperty');
e.errors.message.show().assert.should.equal('HaveProperty');
}
});
Expand All @@ -212,7 +211,7 @@ describe('Client', () => {
} catch (e) {
e.should.be.instanceOf(AssertionFailedError);

e.errors.carrier[0].show().assert.should.equal('IsString');
e.errors.carrier[0].show().assert.should.equal('NullOrString');
e.errors.is_cellphone[0].show().assert.should.equal('Boolean');
e.errors.is_ported[0].show().assert.should.equal('Boolean');
e.errors.message[0].show().assert.should.equal('IsString');
Expand Down

0 comments on commit 442dfad

Please sign in to comment.