Ensure text/plain & text/html content typs are handled and add missing specs for handled HTTP status codes
Add rspec-parameterized gem
Handle multiple content types
It's possible that responses from /api/v4/allowed
could be of varying content type, so we now handle:
application/json
text/html
text/plain
Renamed tests/VCR files to correct names:
- git push = git-receive-pack
- git pull = git-upload-pack
Added missing specs for GitlabNet#check_access()
-
Added specs for:
-
git pull but access is denied (and returns 401)
-
git pull but access is denied (and returns 401 with text/html)
-
git pull but access is denied (and returns 401 with text/plain)
-
git push for project that doesn't exist (and returns 200)
-
git push but access is denied (and returns 401)
-
git push but access is denied (and returns 401 with text/html)
-
git push but access is denied (and returns 401 with text/plain)
-
git push for project that doesn't exist (and returns 404)
-
git push for project that doesn't exist (and returns 404 with text/html)
-
git push for project that doesn't exist (and returns 404 with text/plain)
-
-
Added expectation around message attr
Closes #154 (closed) Related https://gitlab.com/gitlab-org/gitlab-ee/issues/6533