forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'Show on a map' button to Location in profile, fix layout (go-git…
…ea#26214) Not too important, but I think that it'd be a pretty neat touch. Also fixes some layout bugs introduced by a previous PR. --------- Co-authored-by: Gusted <[email protected]> Co-authored-by: Caesar Schinas <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
- Loading branch information
1 parent
72363be
commit d58c542
Showing
9 changed files
with
54 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ import ( | |
repo_model "code.gitea.io/gitea/models/repo" | ||
"code.gitea.io/gitea/models/unittest" | ||
user_model "code.gitea.io/gitea/models/user" | ||
"code.gitea.io/gitea/modules/setting" | ||
api "code.gitea.io/gitea/modules/structs" | ||
"code.gitea.io/gitea/modules/test" | ||
"code.gitea.io/gitea/modules/translation" | ||
|
@@ -276,3 +277,23 @@ func TestListStopWatches(t *testing.T) { | |
assert.Greater(t, apiWatches[0].Seconds, int64(0)) | ||
} | ||
} | ||
|
||
func TestUserLocationMapLink(t *testing.T) { | ||
setting.Service.UserLocationMapURL = "https://example/foo/" | ||
defer tests.PrepareTestEnv(t)() | ||
|
||
session := loginUser(t, "user2") | ||
req := NewRequestWithValues(t, "POST", "/user/settings", map[string]string{ | ||
"_csrf": GetCSRF(t, session, "/user/settings"), | ||
"name": "user2", | ||
"email": "[email protected]", | ||
"language": "en-US", | ||
"location": "A/b", | ||
}) | ||
session.MakeRequest(t, req, http.StatusSeeOther) | ||
|
||
req = NewRequest(t, "GET", "/user2/") | ||
resp := session.MakeRequest(t, req, http.StatusOK) | ||
htmlDoc := NewHTMLParser(t, resp.Body) | ||
htmlDoc.AssertElement(t, `a[href="https://example/foo/A%2Fb"]`, true) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters