mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-14 05:56:14 +01:00
Revert "[TESTS] MockVariable temporarily replaces a global value"
This reverts commit f9618b8896
.
This commit is contained in:
parent
2f6b7ce91a
commit
149cd865ea
1 changed files with 0 additions and 8 deletions
|
@ -16,11 +16,3 @@ func RedirectURL(resp http.ResponseWriter) string {
|
|||
func IsNormalPageCompleted(s string) bool {
|
||||
return strings.Contains(s, `<footer class="page-footer"`) && strings.Contains(s, `</html>`)
|
||||
}
|
||||
|
||||
func MockVariable[T any](variable *T, mock T) func() {
|
||||
original := *variable
|
||||
*variable = mock
|
||||
return func() {
|
||||
*variable = original
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue