From 713d2943444f64dc260246c83528bae396c4d2f8 Mon Sep 17 00:00:00 2001 From: Xeronith Date: Tue, 20 Dec 2022 16:50:59 +0330 Subject: [PATCH] test(components): :test_tube: get outbox --- greataped/components/api/api_test.go | 12 ++++++++++++ greataped/components/core/spi_manager_test.go | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/greataped/components/api/api_test.go b/greataped/components/api/api_test.go index 7073141..c1a950c 100644 --- a/greataped/components/api/api_test.go +++ b/greataped/components/api/api_test.go @@ -213,6 +213,18 @@ func TestPostToOutboxApi(test *testing.T) { } } +func TestGetOutboxApi(test *testing.T) { + input := &GetOutboxRequest{ + Username: "username", + } + + if output, err := api.GetOutbox(input); err != nil { + test.Fatal(err) + } else if output == nil { + test.Fail() + } +} + //region Initialization func TestMain(main *testing.M) { diff --git a/greataped/components/core/spi_manager_test.go b/greataped/components/core/spi_manager_test.go index c1b5ea1..490d27f 100644 --- a/greataped/components/core/spi_manager_test.go +++ b/greataped/components/core/spi_manager_test.go @@ -302,3 +302,14 @@ func TestSpiManager_PostToOutbox(test *testing.T) { _ = result } + +func TestSpiManager_GetOutbox(test *testing.T) { + manager := Conductor.SpiManager() + + result, err := manager.GetOutbox("username", nil) + if err != nil { + test.Fatal(err) + } + + _ = result +}