-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
The usage of NewRequestWithValues(t, "PATCH", url, data)
doesn't work in tests
#29514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
NewRequestWithValues(t, "PATCH", url, data)
doesn't work in tests
|
For |
@lunny |
Any plan to finish it, API requests with form type body can not be applied correctly which looks like a big bug. |
Then the next step is adding result checking in theses tests to confirm whether it works. |
Can you help to send a PR? |
It seems that it does not work. Still got empty items. |
@lunny |
Fix #29514 There are too many usage of `NewRequestWithValues`, so there's no need to check all of them. Just one is enough I think.
Fix go-gitea#29514 There are too many usage of `NewRequestWithValues`, so there's no need to check all of them. Just one is enough I think.
Backport #29674 by @yp05327 Fix #29514 there are too many usage of `NewRequestWithValues`, so there's no need to check all of them. Just one is enough I think. Co-authored-by: yp05327 <[email protected]>
Description
PATCH
request will read data fromForm
, butNewRequestWithValues
will insert data intoBody
, so these data will not be readed correctly.As title, the usage of
NewRequestWithValues(t, "PATCH", url, data)
doesn't work in testse.g.



Gitea Version
latest
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
build
Database
None
The text was updated successfully, but these errors were encountered: