Hi
I’ve just forked Day 14 of the 30 Days of Postman training course (I’m trying to get a few days ahead) and I think I’ve found a bug in one of the “Submit your solution” tests?
In brief, the collection asks you to use OAuth authentication to connect to GitHub, and then utilize the https://api.github.com/user/repos
endpoint to retrieve (and count) a list of the public-visible GitHub repositories on your account (and save to a repoCount collection variable).
However, within the tests for “Submit your solution”, it attempts to verify that my repoCount variable has a value of 30 -
let variable = collection.variable.find(variable => { return variable.key == "repoCount"})
pm.expect(variable.key, 'check collection variable name').equals("repoCount")
pm.expect(variable.value, 'check collection variable name').equals(30)
This test is failing for me, because I only have five public-visible repositories, not 30:
I could just cheat and change the test to expect 5, but then it would fail for everyone else who reaches day 14. Alternatively I suppose I could create 25 additional empty repositories…
(I’d suggest changing it in the main codebase so that it expects the value to be >= 0; after all, there’s no guarantee that a person would necessarily have any repositories in their account.) (Edit: Raised a Pull Request with that suggestion.)