I was attempting to increase code coverage of the validateIdToken test when I realized the tests were not working as expected which then led me to realizing the method itself was not working as expected.
Changes:
Cast response status to number similar to AuthResponse
Check clientID in the list of audience, it was comparing ID to an array before
mockIdPayload in the tests that matches what we are expecting in tests
Coverage increased (+3.3%) to 91.389% when pulling 4ca5afca969ecab768565f8970d7b06bed6489f5 on heykevin:broken_validateIdToken into 6352c7589fef9d94aa0c4ca5b9b04c21b2066675 on intuit:develop.
Coverage increased (+3.3%) to 91.389% when pulling 4ca5afca969ecab768565f8970d7b06bed6489f5 on heykevin:broken_validateIdToken into 6352c7589fef9d94aa0c4ca5b9b04c21b2066675 on intuit:develop.
I was attempting to increase code coverage of the
validateIdToken
test when I realized the tests were not working as expected which then led me to realizing the method itself was not working as expected.Changes: