28 lines · 620 B · Go
RawDownload
// Copyright 2025 The Forgejo Authors. All rights reserved.// SPDX-License-Identifier: MIT package forgefed import (	"testing" 	"forgejo.org/modules/validation" 	ap "github.com/go-ap/activitypub"	"github.com/stretchr/testify/assert") func Test_UserActivityNoteValidation(t *testing.T) {	sut := ForgeUserActivityNote{}	sut.Type = "Note"	sut.Content = ap.NaturalLanguageValues{		{			Ref:   ap.NilLangRef,			Value: ap.Content("Any Content!"),		},	}	sut.URL = ap.IRI("example.org/user-id/57") 	valid, _ := validation.IsValid(sut)	assert.True(t, valid, "sut expected to be valid: %v\n", sut.Validate())}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t