mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-27 16:35:57 +00:00
This PR is part of https://codeberg.org/forgejo/forgejo/pulls/4767 This should not have an outside impact but bring all model changes needed & bring migrations. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8078 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Michael Jerger <michael.jerger@meissa-gmbh.de> Co-committed-by: Michael Jerger <michael.jerger@meissa-gmbh.de>
24 lines
560 B
Go
24 lines
560 B
Go
// Copyright 2024 The Forgejo Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package activities
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"forgejo.org/modules/validation"
|
|
)
|
|
|
|
func Test_FederatedUserActivityValidation(t *testing.T) {
|
|
sut := FederatedUserActivity{}
|
|
sut.UserID = 13
|
|
sut.ActorID = 33
|
|
sut.ActorURI = "33"
|
|
sut.NoteContent = "Any content!"
|
|
sut.NoteURL = "https://example.org/note/17"
|
|
sut.OriginalNote = "federatedUserActivityNote-17"
|
|
|
|
if res, _ := validation.IsValid(sut); !res {
|
|
t.Errorf("sut expected to be valid: %v\n", sut.Validate())
|
|
}
|
|
}
|