Reputation: 23
I got the following response - Pre-Note added with PIN (1368)
The PIN number will not be the same always, so, how can I write a re-runnable test to validate it?
Upvotes: 1
Views: 979
Reputation: 19979
pm.expect(pm.response.text()).to.match(/<text>Pre-Note added with PIN ([\d]{4})<\/text>/);
you can use chai match method that uses regex , here this rehex will validate the pin is 4digit number
Upvotes: 1