Hi, my submission for postman badge failed on Day 6 (as per email) but no apparent error is visible for me. I run collections one by one again to double check if every test is passing and seems like it is. Could anyone review my code and point me in the right direction?
Looks like you’ve edited the tests in the submit collection request, therefore it works when you test it directly but the ones we run on our end do not pass.
Line 55-56, you have:
let idVar = collection.variable.find(variable => { return variable.key === 'userId'})
pm.expect(idVar.key, 'check id variable set').to.equal('userId')
when it should be:
let idVar = collection.variable.find(variable => { return variable.key === 'user_id'})
pm.expect(idVar.key, 'check id variable set').to.equal('user_id')