package handlers
import (
"github.com/go-ap/activitypub"
"testing"
)
func TestPathTyper_Type(t *testing.T) {
t.Skipf("TODO")
}
func TestValidActivityCollection(t *testing.T) {
func TestValidCollection(t *testing.T) {
func TestValidObjectCollection(t *testing.T) {
func TestValidCollectionIRI(t *testing.T) {
func TestSplit(t *testing.T) {
func TestCollectionType_AddTo(t *testing.T) {
func TestCollectionType_IRI(t *testing.T) {
func TestCollectionType_OfActor(t *testing.T) {
func TestCollectionTypes_Contains(t *testing.T) {
func TestIRIf(t *testing.T) {
type args struct {
i activitypub.IRI
t CollectionType
tests := []struct {
name string
args args
want activitypub.IRI
}{
{
name: "empty iri",
args: args{
i: "",
t: "inbox",
},
want: "/inbox",
name: "plain concat",
i: "https://example.com",
want: "https://example.com/inbox",
name: "strip root from iri",
i: "https://example.com/",
name: "invalid iri",
i: "example.com",
t: "test",
want: "example.com/test",
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := IRIf(tt.args.i, tt.args.t); got != tt.want {
t.Errorf("IRIf() = %v, want %v", got, tt.want)
})