summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Finish select2-ajax for users. Added Select2Helper for testsDmitriy Zaporozhets2013-03-141-0/+25
|
* stub git shell mv_repositoryDmitriy Zaporozhets2013-03-121-0/+4
|
* Use gitlab-shell to move repos. Requires gitlab-shell v1.1.0Dmitriy Zaporozhets2013-03-123-66/+47
|
* fix api internal testDmitriy Zaporozhets2013-03-111-1/+1
|
* Merge pull request #3170 from Asquera/api/system_hooks_adjustmentsDmitriy Zaporozhets2013-03-101-2/+14
|\ | | | | API: system hook request functions and documentation updated
| * Merge branch 'master' into api/system_hooks_adjustmentsSebastian Ziebell2013-03-071-28/+49
| |\
| * | API: system hooks API functions and documentation updatedSebastian Ziebell2013-03-071-2/+14
| | | | | | | | | | | | | | | | | | * updated system hooks documentation and code comments * fixed access to system hooks if no user given resulting in a `500 Server Error` * added tests
* | | add coveralls.io to travis buildsDmitriy Zaporozhets2013-03-101-0/+4
| |/ |/|
* | Merge pull request #2835 from Asquera/fixes/apiDmitriy Zaporozhets2013-03-079-22/+511
|\ \ | |/ | | Fix API return codes
| * Merge branch 'master' into fixes/api, code clean up and tests fixedSebastian Ziebell2013-03-078-20/+227
| |\ | | | | | | | | | | | | | | | Conflicts: doc/api/projects.md spec/requests/api/projects_spec.rb
| * \ Merge branch 'master' into fixes/apiSebastian Ziebell2013-03-058-7/+153
| |\ \ | | | | | | | | | | | | | | | | Conflicts: lib/api/projects.rb
| * | | API: fixed adding a noteSebastian Ziebell2013-02-271-2/+1
| | | | | | | | | | | | | | | | Now the correct attribute is checked if it's available or not. Also fixed a test.
| * | | API: extracted helper method to validate required parameters, code clean upSebastian Ziebell2013-02-271-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Added a helper method to check if required parameters are given in an API call. Can be used to return a `400 Bad Request` return code if a required attribute is missing. Code clean up and fixed tests.
| * | | API: merge request documentation updated, added return codes to functionsSebastian Ziebell2013-02-271-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | The API documentation of merge requests contains info to status codes for all functions. Required arguments are now checked in the merge requests API functions and a `400 Bad Request` error is returned if they are not given.
| * | | API: issues documentation and API functions updatedSebastian Ziebell2013-02-271-0/+16
| | | | | | | | | | | | | | | | | | | | The issues documentation is updated with infos to status codes and the deprecated `DELETE` function and how to close an issue. A few more tests added to check status codes of API functions.
| * | | API: session documentation updated and test addedSebastian Ziebell2013-02-271-0/+10
| | | |
| * | | API: groups documentation updated, functions return different status codesSebastian Ziebell2013-02-271-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Updates the API documentation of groups with infos to return codes. The function calls in the groups API have updated documentation and return `400 Bad Request` status code if a required attribute is missing.
| * | | API repository documentation updated, includes infos to return codesSebastian Ziebell2013-02-271-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | The API documentation of repository is updated and now contains infos to status codes. Code documentation is also adjusted for `GET /projects/:id/repository/commits` and includes infos to pagination attributes. Tests are updated.
| * | | Merge branch 'master' into fixes/apiSebastian Ziebell2013-02-2733-201/+376
| |\ \ \
| * | | | API documentation updated for project snippets.Sebastian Ziebell2013-02-211-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | The API Documentation for project snippets got infos to return codes. Tests are added to check status codes when handling project snippets.
| * | | | API: Fixes tests for changed hook deletionSebastian Ziebell2013-02-211-7/+2
| | | | |
| * | | | API documentation update for milestonesSebastian Ziebell2013-02-201-3/+12
| | | | | | | | | | | | | | | | | | | | Updated the milestones API documentation and added return codes descriptions.
| * | | | API: fixes return codes for notes, documentation updatedSebastian Ziebell2013-02-201-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The notes API documentation updated with return codes. API now returns `400 Bad Request` if required attributes are not present. Return codes are documented now, also tested in added tests. The documentation now reflects the current state of the API.
| * | | | Merge branch 'master' into fixes/apiSebastian Ziebell2013-02-201-4/+3
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: spec/requests/api/projects_spec.rb
| * | | | | API: fixes test if project limit is reachedSebastian Ziebell2013-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes a test that checks if the project limit is reached.
| * | | | | Merge branch 'master' into fixes/apiSebastian Ziebell2013-02-2015-276/+273
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: spec/requests/api/projects_spec.rb
| * | | | | | API: fixes return codes, documentation updated with status codes, tests addedSebastian Ziebell2013-02-201-12/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The users API updated with return codes, e.g. if required parameters are missing a `400 Bad Request` error is returned instead of `404`. Fixes return codes of functions, e.g. deletion of a ssh key is an idempotent function now. The API documentation is updated to reflect the current status of the API. Descriptions are more detailed and complete, infos to return values are added to all functions.
| * | | | | | Test to check 404 error when project id not foundSebastian Ziebell2013-02-141-0/+5
| | | | | | |
| * | | | | | Merge branch 'master' into fixes/apiSebastian Ziebell2013-02-144-6/+6
| |\ \ \ \ \ \
| * | | | | | | API: tests that check status codes for project branches and hooksSebastian Ziebell2013-02-141-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Status code 422 (Unprocessable Entity) returned if invalid url is given when creating or updating a project hook.
| * | | | | | | API: status code 403 returned if new project would exceed limitSebastian Ziebell2013-02-141-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the project limit is reached the user is not allowed to create new ones. Instead of error code 404 the status code 403 (Forbidden) is returned with error message via API.
| * | | | | | | API: extracted helper method to provide 400 bad request error with descriptionSebastian Ziebell2013-02-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extracted a method for 400 error (Bad request) and adjusted code accordingly. The name of the missing attribute is used to show which one was missing from the request. It is used to give an appropriate message in the json response.
| * | | | | | | API: return status code 400 if filepath of raw file blob not givenSebastian Ziebell2013-02-131-1/+6
| | | | | | | |
| * | | | | | | API: fixes a few return codes for project snippetsSebastian Ziebell2013-02-131-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using project snippets via API the functions now provide status codes for different situations other then only returning 404 error. If required parameters are missing, e.g. `title` when creating a project snippet a 400 (Bad request) error is returned. The snippet delete function now is idempotent and returns a 200 (Ok) regardless if the snippet with the given id is available or not. Changing return codes of these functions has the advantage that the 404 error is used only for resources, which are not available. Tests added to check these status codes when handling project snippets.
| * | | | | | | Merge branch 'master' into fixes/apiSebastian Ziebell2013-02-134-1/+55
| |\ \ \ \ \ \ \
| * | | | | | | | API: test checks a 400 code is returned if snippet title not givenSebastian Ziebell2013-02-131-0/+6
| | | | | | | | |
| * | | | | | | | API: test checks a 404 error is returned if snippet id not foundSebastian Ziebell2013-02-131-0/+5
| | | | | | | | |
| * | | | | | | | API: changed status codes for project hooks functionsSebastian Ziebell2013-02-121-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Different status codes in the API lib are returned on hook creation, update or deletion. If a required parameter is not given (e.g. `url` in `/projects/:id/hooks/:hook_id`) status code 400 (Bad request) is returned. On hook deletion a 200 status code is returned, regardless if the hook is present or not. This makes the DELETE function an idempotent operation. Appropriate tests are added to check these status codes.
| * | | | | | | | Merge branch 'master' into fixes/apiSebastian Ziebell2013-02-126-13/+8
| |\ \ \ \ \ \ \ \
| * | | | | | | | | Fixes test that checks status code of hook creationSebastian Ziebell2013-02-081-1/+1
| | | | | | | | | |
| * | | | | | | | | Adding a project hook returns status code 400 if url is not givenSebastian Ziebell2013-02-081-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When adding a project hook a url must be specified or a 400 error code is returned * Specs added to check status code on handling project hooks * refactored code, extracted a method
| * | | | | | | | | API: refined status code handling when adding or updating a project memberSebastian Ziebell2013-02-081-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a user is added to a project that is already a member of, a status code 201 is now returned to signal an idempotent operation. If something fails then instead of returning error code 404 different more specific error codes are returned. Status code 400 (Bad request) is returned when a required attribute, e.g. `access_level` is not given or 422 if there is a semantic error, e.g. should the `access_level` have an unsupported value. Specs are added to check these status codes.
| * | | | | | | | | Merge branch 'master' into fixes/apiSebastian Ziebell2013-02-0826-101/+306
| |\ \ \ \ \ \ \ \ \
| * | | | | | | | | | Test to check a user must be part of the team to see project.Sebastian Ziebell2013-02-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A user must be part of the team to see a protected project. A test is given to check that a 404 error is returned if the user can not see the project.
| * | | | | | | | | | Status code 400 is returned if body is missing on note creation.Sebastian Ziebell2013-02-061-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a note is created with a POST request via API (`/projects/:id/notes`) status code 400 is returned instead of 404. The resource itself exists but the request is incomplete. Specs added to check different status codes when accessing, creating and updating notes.
| * | | | | | | | | | Tests added to check status codes when handling milestone via APISebastian Ziebell2013-02-061-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few more tests added to check status code when creating or updating milestones.
| * | | | | | | | | | Test added to check creation of note to a non-existent MR via APISebastian Ziebell2013-02-061-0/+5
| | | | | | | | | | |
| * | | | | | | | | | Creating MR comment without a note returns status code 400 (Bad request)Sebastian Ziebell2013-02-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creating a comment to an existing merge request via API without providing a note returns a status code 400 now, suggesting a bad request. The reason for this is the resource itself (MR) exists but the required property is not set.
| * | | | | | | | | | Creating or updating a MR returns more informative status codes.Sebastian Ziebell2013-02-061-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the API library to create or update a merge request at the moment a 404 error is returned. This is fine when the merge request in question does not exist, but does not provide good information that for example a required attribute is missing. A status code of 400 (Bad request) is returned when creating or updating a merge request when either `source_branch` or `target_branch` is missing. A status code of 409 is returned when `source_branch` and `target_branch` are the same. Tests are added for these cases.
| * | | | | | | | | | Don't crash when removing a user that's not project memberFelix Gilcher2013-02-011-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The attempt to revoke project access for a user that was not member of the project results in a 500 Internal Server error where it actually should result in a 200 OK since after the operation, the user is not member of the project. This turns the operation into an idempotent call that can be repeated with no ill effects. Updated the spec and changed the code accordingly. However, the result differs slightly, as we can't return the users project access level if the user was not member. I'm not aware if anybody relies on the result of this call. Fixes #2832