kopia lustrzana https://github.com/reiver/greatape
test(components): 🧪 post to outbox
rodzic
dc3c93b133
commit
739f4c2813
|
@ -195,6 +195,24 @@ func TestGetFollowingApi(test *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestPostToOutboxApi(test *testing.T) {
|
||||
input := &PostToOutboxRequest{
|
||||
Username: "username",
|
||||
Context: "context",
|
||||
ActivityType: "activity_type",
|
||||
To: "to",
|
||||
AttributedTo: "attributed_to",
|
||||
InReplyTo: "in_reply_to",
|
||||
Content: "content",
|
||||
}
|
||||
|
||||
if output, err := api.PostToOutbox(input); err != nil {
|
||||
test.Fatal(err)
|
||||
} else if output == nil {
|
||||
test.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
//region Initialization
|
||||
|
||||
func TestMain(main *testing.M) {
|
||||
|
|
|
@ -291,3 +291,14 @@ func TestSpiManager_GetFollowing(test *testing.T) {
|
|||
|
||||
_ = result
|
||||
}
|
||||
|
||||
func TestSpiManager_PostToOutbox(test *testing.T) {
|
||||
manager := Conductor.SpiManager()
|
||||
|
||||
result, err := manager.PostToOutbox("username", "context", "activity_type", "to", "attributed_to", "in_reply_to", "content", nil)
|
||||
if err != nil {
|
||||
test.Fatal(err)
|
||||
}
|
||||
|
||||
_ = result
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue