1
0
Fork 0
golang-github-go-ap-activit.../extractors_test.go
Daniel Baumann c8085bda34
Adding upstream version 0.0~git20250501.71edba4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-18 22:06:39 +02:00

87 lines
1.4 KiB
Go

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)
}
})
}
}