mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 22:01:44 +02:00
Refactor some tests (#34580)
1. use `test.MockVariableValue` as much as possible 2. avoid `time.Sleep` as much as possible
This commit is contained in:
1 parent
c5e78fc7ad
commit
2a1585b32e
23 files changed
+58
-148
No files matched your search
@@ -257,8 +257,8 @@ func TestListStopWatches(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUserLocationMapLink(t *testing.T) {
|
||||
setting.Service.UserLocationMapURL = "https://example/foo/"
|
||||
defer tests.PrepareTestEnv(t)()
|
||||
defer test.MockVariableValue(&setting.Service.UserLocationMapURL, "https://example/foo/")()
|
||||
|
||||
session := loginUser(t, "user2")
|
||||
req := NewRequestWithValues(t, "POST", "/user/settings", map[string]string{
|
||||
|
||||
Reference in new issue
Block a user