aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/api_issue_reaction_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Move milestone to models/issues/ (#19278)Lunny Xiao2022-04-081-2/+3
| | | | | | | | | | | * Move milestone to models/issues/ * Fix lint * Fix test * Fix lint * Fix lint
* format with gofumpt (#18184)65432022-01-201-10/+10
| | | | | | | | | | | * gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt
* Move user related model into models/user (#17781)Lunny Xiao2021-11-241-5/+6
| | | | | | | | | | | | | * Move user related model into models/user * Fix lint for windows * Fix windows lint * Fix windows lint * Move some tests in models * Merge
* Remove unnecessary variable assignments (#17695)Gusted2021-11-181-8/+8
| | | | | | | | | | * Remove unnecessary variable assignments As title * enable ineffassign Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Decouple unit test, remove intermediate `unittestbridge` package (#17662)wxiaoguang2021-11-161-8/+8
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Move db related basic functions to models/db (#17075)Lunny Xiao2021-09-191-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | * Move db related basic functions to models/db * Fix lint * Fix lint * Fix test * Fix lint * Fix lint * revert unnecessary change * Fix test * Fix wrong replace string * Use *Context * Correct committer spelling and fix wrong replaced words Co-authored-by: zeripath <art27@cantab.net>
* [refactor] Unify the export of user data via API (#15144)65432021-03-271-3/+3
| | | | | * [refactor] unify how user data is exported via API * test time via unix timestamp
* [Refactor] Move APIFormat functions into convert package (#12856)65432020-10-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | * USER APIFormat -> ToUser * Migrate more and mark APIFormat deprecated * models.Comment APIFormat() -> convert.ToComment * models.Release APIFormat() -> convert.ToRelease * models.Attachments APIFormat() -> convert.ToReleaseAttachments * models.CommitStatus APIFormat() -> convert.ToCommitStatus * finish migration to convert.ToUser * Move Test * Imprufe Test * fix test Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* API: Expose its limitation settings (#12714)65432020-09-041-14/+0
| | | | | | | | * API: Expose its limitation settings * TESTs Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* API: Move AllowedReactions endpoint into GetGenneralUI endpoint + creat new ↵65432020-06-221-6/+4
| | | | | | | | | | | | | swagger section settings (#11854) * move Setting function into its own package * swagger add&use new section "settings" * move api AllowedReactions into general UI-Settings endpoint * prepare TEST * lint
* [API] Expose allowed Reactions (#11735)65432020-06-041-0/+16
| | | | | | | | | | | * [API] Expose allowed Reactions * dont be in soutch a rush * add TEST * use ElementsMatch Co-authored-by: Lauris BH <lauris@nix.lv>
* [API] Fix 9544 | return 200 when reaction already exist (#9550)65432019-12-311-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add ErrReactionAlreadyExist * extend CreateReaction * reaction already exist = 200 * extend FindReactionsOptions * refactor swagger options/definitions * fix swagger-validate * Update models/error.go Co-Authored-By: zeripath <art27@cantab.net> * fix test PART1 * extend FindReactionsOptions with UserID option * catch error on test * fix test PART2 * format ... Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net>
* Hide not allowed Reactions (#9387)65432019-12-181-8/+2
| | | | | | | | | | | | * Hide not allowed Reactions * filter in query :D * use ` Co-Authored-By: Alexey 〒erentyev <axifnx@gmail.com> * update xorm v0.8.0 -> v0.8.1
* [API] Add Reactions (#9220)65432019-12-071-0/+145
* reject reactions wich ar not allowed * dont duble check CreateReaction now throw ErrForbiddenIssueReaction * add /repos/{owner}/{repo}/issues/comments/{id}/reactions endpoint * add Find Functions * fix some swagger stuff + add issue reaction endpoints + GET ReactionList now use FindReactions... * explicite Issue Only Reaction for FindReactionsOptions with "-1" commentID * load issue; load user ... * return error again * swagger def canged after LINT * check if user has ben loaded * add Tests * better way of comparing results * add suggestion * use different issue for test (dont interfear with integration test) * test dont compare Location on timeCompare * TEST: add forbidden dubble add * add comments in code to explain * add settings.UI.ReactionsMap so if !setting.UI.ReactionsMap[opts.Type] works