mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-21 05:28:00 +02:00
feat: expose url field on issue api. (#982)
* Add api url func. Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * fix: Add unit testing. * fix: conflicts * fix: remove trim * fix: revert test function name.
This commit is contained in:
@ -125,3 +125,10 @@ func TestForkRepository(t *testing.T) {
|
||||
assert.Error(t, err)
|
||||
assert.True(t, IsErrRepoAlreadyExist(err))
|
||||
}
|
||||
|
||||
func TestRepoAPIURL(t *testing.T) {
|
||||
assert.NoError(t, PrepareTestDatabase())
|
||||
repo := AssertExistsAndLoadBean(t, &Repository{ID: 10}).(*Repository)
|
||||
|
||||
assert.Equal(t, "https://try.gitea.io/api/v1/repos/user12/repo10", repo.APIURL())
|
||||
}
|
||||
|
Reference in New Issue
Block a user