1
0
Fork 0

Adding upstream version 0.0~git20250501.71edba4.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-18 22:06:39 +02:00
parent c6ff472a6d
commit c8085bda34
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
87 changed files with 24009 additions and 0 deletions

87
extractors_test.go Normal file
View file

@ -0,0 +1,87 @@
package activitypub
import "testing"
func TestContentOf(t *testing.T) {
tests := []struct {
name string
arg Item
want string
}{
{
name: "empty",
arg: nil,
want: "",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := ContentOf(tt.arg); got != tt.want {
t.Errorf("ContentOf() = %v, want %v", got, tt.want)
}
})
}
}
func TestNameOf(t *testing.T) {
tests := []struct {
name string
arg Item
want string
}{
{
name: "empty",
arg: nil,
want: "",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := NameOf(tt.arg); got != tt.want {
t.Errorf("NameOf() = %v, want %v", got, tt.want)
}
})
}
}
func TestPreferredNameOf(t *testing.T) {
tests := []struct {
name string
arg Item
want string
}{
{
name: "empty",
arg: nil,
want: "",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := PreferredNameOf(tt.arg); got != tt.want {
t.Errorf("PreferredNameOf() = %v, want %v", got, tt.want)
}
})
}
}
func TestSummaryOf(t *testing.T) {
tests := []struct {
name string
arg Item
want string
}{
{
name: "empty",
arg: nil,
want: "",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := SummaryOf(tt.arg); got != tt.want {
t.Errorf("SummaryOf() = %v, want %v", got, tt.want)
}
})
}
}