From eb7f6a103f1768c6259adc750c6f5da8c07c5ed2 Mon Sep 17 00:00:00 2001 From: saba_zedginidze Date: Thu, 7 Nov 2024 15:58:34 +0400 Subject: [PATCH] [MODINVOSTO-187] Add API test --- .../folio/rest/impl/AuditOutboxAPITest.java | 30 +++++++++++++++++++ .../org/folio/rest/impl/StorageTestSuite.java | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 src/test/java/org/folio/rest/impl/AuditOutboxAPITest.java diff --git a/src/test/java/org/folio/rest/impl/AuditOutboxAPITest.java b/src/test/java/org/folio/rest/impl/AuditOutboxAPITest.java new file mode 100644 index 00000000..a0db3c7c --- /dev/null +++ b/src/test/java/org/folio/rest/impl/AuditOutboxAPITest.java @@ -0,0 +1,30 @@ +package org.folio.rest.impl; + +import static io.restassured.RestAssured.given; +import static org.folio.rest.impl.StorageTestSuite.storageUrl; + +import java.net.MalformedURLException; + +import org.junit.jupiter.api.Test; + +import io.restassured.http.ContentType; + +public class AuditOutboxAPITest extends TestBase { + + public static final String AUDIT_OUTBOX_ENDPOINT = "/invoice-storage/audit-outbox/process"; + + @Test + void testPostInvoiceStorageAuditOutboxProcess() throws MalformedURLException { + given() + .spec(commonRequestSpec()) + .when() + .post(storageUrl(AUDIT_OUTBOX_ENDPOINT)) + .then() + .assertThat() + .statusCode(200) + .contentType(ContentType.JSON) + .extract() + .response(); + } + +} diff --git a/src/test/java/org/folio/rest/impl/StorageTestSuite.java b/src/test/java/org/folio/rest/impl/StorageTestSuite.java index dc79c2b5..35dcb40f 100644 --- a/src/test/java/org/folio/rest/impl/StorageTestSuite.java +++ b/src/test/java/org/folio/rest/impl/StorageTestSuite.java @@ -170,4 +170,6 @@ class BatchVoucherExportsTestNested extends BatchVoucherExportsImplTest{} class VoucherNumberTestNested extends VoucherNumberTest {} @Nested class OrderStorageServiceTestNested extends OrderStorageServiceTest {} + @Nested + class AuditOutboxAPITestNested extends AuditOutboxAPITest {} }