From 62ece351c06f86bd8a15d5ff3627c5d1209a8c75 Mon Sep 17 00:00:00 2001 From: Xeronith Date: Wed, 4 Jan 2023 13:23:13 +0330 Subject: [PATCH] test(components): :test_tube: get inbox --- 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 b70739c..c187d90 100644 --- a/greataped/components/api/api_test.go +++ b/greataped/components/api/api_test.go @@ -237,6 +237,18 @@ func TestPostToInboxApi(test *testing.T) { } } +func TestGetInboxApi(test *testing.T) { + input := &GetInboxRequest{ + Username: "username", + } + + if output, err := api.GetInbox(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 f317c7f..cdf45d3 100644 --- a/greataped/components/core/spi_manager_test.go +++ b/greataped/components/core/spi_manager_test.go @@ -324,3 +324,14 @@ func TestSpiManager_PostToInbox(test *testing.T) { _ = result } + +func TestSpiManager_GetInbox(test *testing.T) { + manager := Conductor.SpiManager() + + result, err := manager.GetInbox("username", nil) + if err != nil { + test.Fatal(err) + } + + _ = result +}