Commit Graph

42 Commits

Author SHA1 Message Date
Fabio Busatto 035c8af12e Resolve "Get milestone by title via API" 2019-03-27 09:01:07 +00:00
Robert Speicher 0e64286f56 Merge branch 'improve-spec-requests-api-merge_requests_spec' into 'master'
Reduce queries in spec/requests/api/merge_requests_spec.rb

See merge request gitlab-org/gitlab-ce!26110
2019-03-15 10:05:13 +00:00
Rémy Coutable 9aaa6c3fa4
Reduce diff with EE in spec/fixtures/api/schemas
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-03-14 10:33:48 +01:00
Rémy Coutable 9e324ded43
Reduce queries in spec/requests/api/merge_requests_spec.rb
This reduces the queries from 97137 to 65136 and the query time from
02:04 to 01:27 in spec/requests/api/merge_requests.rb.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-03-13 17:56:26 +01:00
Rémy Coutable 12e2c3aa48
Reduce differences in spec/support/api/schema_matcher.rb
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-03-07 08:13:37 +01:00
Stan Hu 22f63b7b54 Revert "Merge branch '50559-add-milestone-progress-to-api' into 'master'"
This reverts merge request !25173
2019-02-14 05:06:38 +00:00
Robert Schilling 3328f097c9 Add milestone progress to API 2019-02-13 12:24:13 +00:00
Jasper Maes bf73520079 convert specs in javascripts/ and support/ to new syntax 2018-12-21 10:10:26 +01:00
Sean McGivern 722631a929 Merge branch 'issue_36138' into 'master'
Allow to delete group milestones

Closes #36138

See merge request gitlab-org/gitlab-ce!21057
2018-08-28 07:49:09 +00:00
sliaquat 4157073068 Remove some duplicate tests and fix some typos 2018-08-16 16:40:03 +05:00
Felipe Artur abb50ff471 Allow to delete group milestones 2018-08-06 17:31:47 -03:00
Lin Jen-Shin 4ee08b77bc Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
Francisco Javier López df45623b34 Restoring user v3 endpoint 2018-06-13 08:25:01 +00:00
Francisco Javier López 4d3f7ae1ef
Removed API endpoint and specs 2018-05-30 18:23:07 +02:00
Mark Fletcher 2dd1c8e5d8 Allow start_date as only parameter when updating Milestone via API 2018-05-24 16:05:29 +01:00
Jacopo 890dc39ee0 Updates updated_at on issue when using /spend quick action 2018-05-09 18:08:37 +02:00
Felipe Artur 5e148d4e93 EE-BACKPORT group boards 2018-01-04 17:28:10 -02:00
blackst0ne 27c95364b5 Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
Robert Speicher 3e4b45fc21 Only include the user's ID in the time_spent command's update hash
Previously, this would include the entire User record in the update
hash, which was rendered in the response using `to_json`, erroneously
exposing every attribute of that record, including their (now removed)
private token.

Now we only include the user ID, and perform the lookup on-demand.
2017-12-19 15:45:08 -06:00
Jacopo 2f40dac352 Refactor `have_http_status` into `have_gitlab_http_status` in the specs 2017-10-20 10:13:18 +02:00
Douwe Maan 025c6eeaa1 Move all API authentication code to APIGuard 2017-10-12 11:13:37 +02:00
Robin Bobbitt 62ef67acc3 Hide read_registry scope when registry is disabled on instance 2017-08-21 18:13:32 -04:00
Rémy Coutable c946ee1282
Enable the Layout/SpaceBeforeBlockBraces cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09 11:52:22 +02:00
Lin Jen-Shin b7547ade67 Backport to CE for:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2483
2017-08-04 21:45:14 +08:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Rémy Coutable 649382b1c2 Fix the /projects/:id/repository/branches endpoint to handle dots in the branch name when the project full patch contains a `/`
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:29:31 +02:00
Felipe Artur c5c9dce270 Add group milestones API endpoint 2017-07-21 11:00:00 -03:00
Timothy Andrew 1b8223dd51 Fix remaining spec failures for !12300.
1. Get the spec for `lib/gitlab/auth.rb` passing.

  - Make the `request` argument to `AccessTokenValidationService` optional -
  `auth.rb` doesn't need to pass in a request.

  - Pass in scopes in the format `[{ name: 'api' }]` rather than `['api']`, which
  is what `AccessTokenValidationService` now expects.

2. Get the spec for `API::V3::Users` passing

2. Get the spec for `AccessTokenValidationService` passing
2017-06-28 07:17:13 +00:00
Timothy Andrew 0ff1d16192 Test OAuth token scope verification in the `API::Users` endpoint 2017-06-28 07:17:13 +00:00
Timothy Andrew 157c05f49d Test `/users` endpoints for the `read_user` scope.
- Test `GET` endpoints to check that the scope is allowed.
- Test `POST` endpoints to check that the scope is disallowed.
- Test both `v3` and `v4` endpoints.
2017-06-28 07:17:13 +00:00
Pawel Chojnacki 969b812433 Add schema matcher for non response objects + use schema to test additional metrics compliance 2017-06-06 19:35:28 +02:00
Bob Van Landuyt 0267b83898 Delegate a single discussion to a new issue
Delegate a discussion in a merge request into a new issue.
The discussion wil be marked as resolved and a system note will be
added linking to the newly created issue.
2017-03-13 08:27:51 +01:00
Timothy Andrew 519bac658a
Fix time tracking endpoints for API v4
- Use issue/merge_request IID instead of ID
- Duplicate the original `TimeTrackingEndpoints` concern (+ specs) for V3, since
  this is a breaking change.
2017-03-07 13:56:00 +05:30
Timothy Andrew dd99622347
API routes referencing a specific issue should use the issue `iid`
- As opposed to the issue `id` that was previously being used.
- This brings the API routes closer to the web interface's routes.
- This is specific to API v4.
2017-03-07 13:06:42 +05:30
Robert Schilling 993c3d14d5 Remove shared example for pagination 2017-02-20 15:39:16 +01:00
Ruben Davila 0f3c9355c1 Add some API endpoints for time tracking.
New endpoints are:

POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/time_estimate"

POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/reset_time_estimate"

POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/add_spent_time"

POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/reset_spent_time"

GET  :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/time_stats"
2017-01-18 10:48:16 -06:00
Rémy Coutable 0349e83aa7 Improve specs for Files API
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-20 16:11:10 +01:00
Rémy Coutable c87d93d462
Improve specs for Repositories API
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-20 13:40:41 +01:00
Douglas Barbosa Alexandre 29a91c5bc6 Fix matcher `match_response_schema` 2016-08-17 12:58:59 -03:00
Douglas Barbosa Alexandre e199884478 Projects::BoardsController#show returns a list of board lists 2016-08-17 12:58:58 -03:00
Rémy Coutable 29850364ec New AccessRequests API endpoints for Group & Project
Also, mutualize AccessRequests and Members endpoints for Group &
Project.
New API documentation for the AccessRequests endpoints.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-10 19:07:05 +02:00
Rémy Coutable 3183092ca9 Add pagination headers to already paginated API resources 2016-01-14 12:10:27 +01:00