fixed tests

part1, one test still failing
This commit is contained in:
Clemens 2024-03-28 09:36:08 +01:00
parent d624ebb712
commit 1ad7bdf983
11 changed files with 43 additions and 24 deletions

View file

@ -217,3 +217,12 @@ func TestComposeSSHCloneURL(t *testing.T) {
setting.SSH.Port = 123
assert.Equal(t, "ssh://git@[::1]:123/user/repo.git", repo_model.ComposeSSHCloneURL("user", "repo"))
}
func TestAPAPIURL(t *testing.T) {
repo := repo_model.Repository{ID: 1}
url := repo.APAPIURL()
expected := "https://try.gitea.io/api/v1/activitypub/repository-id/1"
if url != expected {
t.Errorf("unexpected APAPIURL, expected: %q, actual: %q", expected, url)
}
}