mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-20 03:11:35 +02:00
models/user: add test for APActorKeyID
This commit is contained in:
parent
ea18810697
commit
a7ad480ae2
1 changed files with 9 additions and 0 deletions
|
@ -153,6 +153,15 @@ func TestAPActorID_APActorID(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestAPActorKeyID(t *testing.T) {
|
||||
user := user_model.User{ID: 1}
|
||||
url := user.APActorKeyID()
|
||||
expected := "https://try.gitea.io/api/v1/activitypub/user-id/1#main-key"
|
||||
if url != expected {
|
||||
t.Errorf("unexpected APActorKeyID, expected: %q, actual: %q", expected, url)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSearchUsers(t *testing.T) {
|
||||
defer tests.AddFixtures("models/user/fixtures/")()
|
||||
require.NoError(t, unittest.PrepareTestDatabase())
|
||||
|
|
Loading…
Add table
Reference in a new issue