From e23645eb02df6aa249561d4d7f68d96a823eb758 Mon Sep 17 00:00:00 2001 From: Katie Kroell Date: Tue, 17 Oct 2023 12:47:09 -0400 Subject: [PATCH] start of store unit tests --- src/store/store.spec.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 9fc8f865..ce0fc9fd 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -1104,4 +1104,22 @@ describe('Store', () => { expect(store.isDropOffAppointment).toBe(false); }); }); + + describe('getFinalDeductible method', () => { + describe('successful method call', () => { + it.only('calls get final deductible api endpoint', () => { + // Arrange + globalMethods.callHttpClient = jest.fn().mockReturnValue(Promise.resolve({})); + + // Act + store.getFinalDeductible(); + + // Assert + expect(globalMethods.callHttpClient).toHaveBeenCalledWith(expect.objectContaining({ + method: endpoints.FinalDeductible.method, + endpoint: endpoints.FinalDeductible.url, + })); + }); + }); + }); });