Commit Graph

67 Commits

Author SHA1 Message Date
Mark Chao a63bce1a4b Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
Lin Jen-Shin 4ee08b77bc Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
Jan Provaznik dcdfa04b32 Add discussion API
* adds basic discussions API for issues and snippets
* reorganizes notes specs (so same tests can be used for all noteable types - issues, MRs, snippets)
2018-03-07 12:27:50 +01:00
Oswaldo Ferreira bf8c20729b Cache merged and closed events data in merge_request_metrics table 2018-01-02 17:45:25 -02:00
blackst0ne 27c95364b5 Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
haseeb 57d9121127 support ordering of project notes in notes api 2017-11-29 16:22:22 +00:00
Jacopo 2f40dac352 Refactor `have_http_status` into `have_gitlab_http_status` in the specs 2017-10-20 10:13:18 +02:00
Jarka Kadlecova 994e7d1359 Create system notes for MR too, improve doc + clean up code 2017-09-14 14:50:32 +02:00
Robert Schilling 915dd57fe2 Add tests for the unmodified header 2017-08-28 17:10:34 +02:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Robert Speicher a6ec5121f0 Correct RSpec/SingleLineHook cop offenses 2017-06-14 13:18:56 -05:00
Jacopo ff76adb547 Unnecessary "include WaitForAjax" and "include ApiHelpers"
Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs.
Removed unnecessary usage of `api:true`
2017-04-21 22:32:02 +02:00
Toon Claes add5cd996f API: Make the /notes endpoint work with noteable iid instead of id
In API V4 all endpoints were changed so Merge Requests and Issues
should be referred by iid, instead of id. Except the /notes endpoint
was forgotten. So change the endpoints from:

- /projects/:id/issues/:issue_id/notes
- /projects/:id/merge_requests/:merge_request_id/notes

To:

- /projects/:id/issues/:issue_iid/notes
- /projects/:id/merge_requests/:merge_request_iid/notes

For Project Snippets nothing changes.
2017-03-27 15:29:37 +02:00
Sean McGivern 523fb730c2 Merge branch '25437-just-emoji' into 'master'
#25437 Allow posting of just an emoji in comment; add /award slash command

Closes #25437

See merge request !9382
2017-03-01 11:15:51 +00:00
mhasbini 9f949d4e24 add /award slash command
add /award slash command; Allow posting of just an emoji in comment
2017-02-28 22:38:19 +02:00
Robert Schilling 86c58687b2 Return 204 for delete endpoints 2017-02-28 08:32:38 +01:00
Robert Schilling 993c3d14d5 Remove shared example for pagination 2017-02-20 15:39:16 +01:00
Robert Schilling c70dfbc686 Add a custom pagination matcher 2017-02-16 15:38:40 +01:00
Robert Speicher a1f959430b Merge branch 'fix-guest-access-posting-to-notes' into 'security'
Prevent users from creating notes on resources they can't access

See https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2054
2017-01-23 13:54:52 -05:00
Rémy Coutable 9c560b5cdf
Replace many :project with :empty_projects in API specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-17 11:41:27 -05:00
Rémy Coutable c8fb6f6f37 Merge branch 'update-api-spec-files' into 'master'
Update  API spec files to describe the correct class by changing `API::API` to the corresponding class, for example `API::AwardEmoji`.

Closes #24902

See merge request !7718
2016-12-02 09:38:11 +00:00
Livier eb4f15571d Changed API spec files to describe the correct class
Restore changes for api spec files

Fix error in rspec Users

Delete extra space Repositories-spec
2016-11-28 10:55:27 -07:00
Douwe Maan 6df22f72c6 Rephrase some system notes to be compatible with new system note style 2016-11-24 18:26:29 +08:00
barthc ea6c5c1c0e
Fix authored vote from notes
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-24 15:24:56 +02:00
Nick Thomas bfb20200e9 Add a be_like_time matcher and use it in specs
The amount of precision times have in databases is variable, so we need
tolerances when comparing in specs. It's better to have the tolerance defined
in one place than several.
2016-10-17 14:44:20 +01:00
Z.J. van de Weg cf00fbecc5 Fix API notes endpoint when posting only emoji 2016-09-16 16:28:53 +02:00
Clement Ho 77abf8cccf Capitalize mentioned issue timeline notes 2016-08-25 10:47:40 -05:00
tiagonbotelho 1d268a89de adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
Grzegorz Bizon 9e211091a8 Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
Z.J. van de Weg abca19da8b Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
Grzegorz Bizon 1bcb1ef85e Update specs for creating new note without access 2016-05-29 15:03:00 -04:00
Felipe Artur c9be74e247 Fix single note api request 2016-05-16 16:43:19 -03:00
Felipe Artur 93ca5c9964 Fix notes API calls symbol convertions 2016-05-10 16:06:02 -03:00
Felipe Artur e56e3cdc62 Fix api leaking notes when user is not authorized to read noteable 2016-05-09 19:35:37 -03:00
Robert Speicher be67a4843c Prevent privilege escalation via notes API
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15577
2016-04-26 14:40:51 -04:00
Michael Greene c1467f5d97 Allow back dating notes on creation 2016-04-13 12:04:09 -05:00
Robert Schilling dc39c8372d Adapt tests to new testing guidelines 2016-04-12 15:43:29 +02:00
Robert Schilling 9aefaa41ab Fix code review issues 2016-04-12 14:24:05 +02:00
Robert Schilling ba21c00f01 Delete notes via API 2016-04-12 14:24:05 +02:00
Rémy Coutable 3183092ca9 Add pagination headers to already paginated API resources 2016-01-14 12:10:27 +01:00
Rémy Coutable e918493f55 Fix specs and rubocop warnings 2016-01-14 10:04:48 +01:00
Rémy Coutable 0c10aee596 Ensure the API doesn't return notes that the current user shouldn't see 2016-01-13 19:42:36 +01:00
Jeroen van Baarsen 0c4a70a306 Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:17:35 +01:00
uran 1fbc010241 Implemented notes (body) patching in API. 2014-12-25 14:28:40 +02:00
Dmitriy Zaporozhets 2d87556847 Remove rails observers from application 2014-06-17 22:51:43 +03:00
Dmitriy Zaporozhets 8ff171f628
Fix api specs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-13 19:39:12 +03:00
Dmitriy Zaporozhets d593c98fcb
Delete wall notes tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-13 14:29:26 +03:00
Jeroen van Baarsen 5dd2f36ae1 Added API testing group 2014-04-11 21:45:56 +02:00
Angus MacArthur aefe2e952f Fixing unsafe use of Thread.current variable :current_user 2013-10-16 01:20:53 -04:00