From 0b4bf58107cdbcc1c826eb3d8f0e63073335c0f1 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Thu, 31 Oct 2024 16:31:29 +0300 Subject: [PATCH] resolved failing tests due to tempData --- internal/handlers/ussd/menuhandler_test.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/internal/handlers/ussd/menuhandler_test.go b/internal/handlers/ussd/menuhandler_test.go index a960cfc..6672ab1 100644 --- a/internal/handlers/ussd/menuhandler_test.go +++ b/internal/handlers/ussd/menuhandler_test.go @@ -2119,14 +2119,6 @@ func TestSetVoucher(t *testing.T) { utils.DATA_ACTIVE_ADDRESS: []byte(tempData.ContractAddress), } - // Define the temporary entries to be cleared - tempEntries := map[utils.DataTyp][]byte{ - utils.DATA_TEMPORARY_SYM: []byte(""), - utils.DATA_TEMPORARY_BAL: []byte(""), - utils.DATA_TEMPORARY_DECIMAL: []byte(""), - utils.DATA_TEMPORARY_ADDRESS: []byte(""), - } - // Mocking ReadEntry calls for temporary data retrieval mockDataStore.On("ReadEntry", ctx, sessionId, utils.DATA_TEMPORARY_SYM).Return([]byte(tempData.TokenSymbol), nil) mockDataStore.On("ReadEntry", ctx, sessionId, utils.DATA_TEMPORARY_BAL).Return([]byte(tempData.Balance), nil) @@ -2138,11 +2130,6 @@ func TestSetVoucher(t *testing.T) { mockDataStore.On("WriteEntry", ctx, sessionId, key, value).Return(nil) } - // Mocking WriteEntry calls for clearing temporary data - for key, value := range tempEntries { - mockDataStore.On("WriteEntry", ctx, sessionId, key, value).Return(nil) - } - h := &Handlers{ userdataStore: mockDataStore, }