diff --git a/handlers/application/menuhandler_test.go b/handlers/application/menuhandler_test.go index d4a42da..64df15d 100644 --- a/handlers/application/menuhandler_test.go +++ b/handlers/application/menuhandler_test.go @@ -2124,20 +2124,19 @@ func TestCheckVouchers(t *testing.T) { func TestGetVoucherList(t *testing.T) { sessionId := "session123" - ctx := context.WithValue(context.Background(), "SessionId", sessionId) - - spdb := InitializeTestSubPrefixDb(t, ctx) + ctx, store := InitializeTestStore(t) + ctx = context.WithValue(ctx, "SessionId", sessionId) // Initialize MenuHandlers h := &MenuHandlers{ - prefixDb: spdb, + userdataStore: store, ReplaceSeparatorFunc: mockReplaceSeparator, } mockSyms := []byte("1:SRF\n2:MILO") // Put voucher sym data from the store - err := spdb.Put(ctx, storedb.ToBytes(storedb.DATA_VOUCHER_SYMBOLS), mockSyms) + err := store.WriteEntry(ctx, sessionId, storedb.DATA_VOUCHER_SYMBOLS, mockSyms) if err != nil { t.Fatal(err) }