Add missing testing for the new GitLab API v4 support.
Review Request #9789 — Created March 15, 2018 and submitted
Some unit tests were missing from the GitLab API v4 change. We had the
beginnings of a function for checking repositories against the v4 API,
but it never actually performed any checks (and was missing a necessary
part of the payload to make the checks happen).
This fills in the missing logic, and adds a utility function for setting
the API version for a test so spies don't need to be repeated in several
Unit tests pass.