test(components): 🧪 post to outbox

master
Xeronith 2022-12-15 18:44:08 +03:30
rodzic dc3c93b133
commit 739f4c2813
2 zmienionych plików z 29 dodań i 0 usunięć

Wyświetl plik

@ -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) {

Wyświetl plik

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