Add final test for Object.Link()

This commit is contained in:
Marius Orcsik 2018-04-09 00:51:26 +02:00
parent 35e465347c
commit 782ca4f484
No known key found for this signature in database
GPG key ID: 889CE8E4FB2D877A

View file

@ -1,6 +1,7 @@
package activitypub package activitypub
import ( import (
"reflect"
"testing" "testing"
) )
@ -125,3 +126,10 @@ func TestObject_IsObject(t *testing.T) {
t.Errorf("%#v should be a valid object", m.Type) t.Errorf("%#v should be a valid object", m.Type)
} }
} }
func TestObject_Link(t *testing.T) {
o := ObjectNew("test", ObjectType)
if !reflect.DeepEqual(Link{}, o.Link()) {
t.Errorf("%#v should be an empty Link object", o.Link())
}
}