Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F10700689
activitypub_test.go
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
574 B
Subscribers
None
activitypub_test.go
View Options
package
writefreely
import
(
"testing"
"github.com/writeas/web-core/activitystreams"
)
var
actorTestTable
=
[]
struct
{
Name
string
Resp
[]
byte
}{
{
"Context as a string"
,
[]
byte
(
`{"@context":"https://www.w3.org/ns/activitystreams"}`
),
},
{
"Context as a list"
,
[]
byte
(
`{"@context":["one string", "two strings"]}`
),
},
}
func
TestUnmarshalActor
(
t
*
testing
.
T
)
{
for
_
,
tc
:=
range
actorTestTable
{
actor
:=
activitystreams
.
Person
{}
err
:=
unmarshalActor
(
tc
.
Resp
,
&
actor
)
if
err
!=
nil
{
t
.
Errorf
(
"%s failed with error %s"
,
tc
.
Name
,
err
)
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jun 7, 12:29 AM (12 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3256311
Attached To
rWF WriteFreely
Event Timeline
Log In to Comment