remove the subprefix db from TestGetVoucherList

This commit is contained in:
Alfred Kamanda 2025-03-24 20:01:44 +03:00
parent 71c01e00cd
commit b8d53f82bb
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -2124,20 +2124,19 @@ func TestCheckVouchers(t *testing.T) {
func TestGetVoucherList(t *testing.T) { func TestGetVoucherList(t *testing.T) {
sessionId := "session123" sessionId := "session123"
ctx := context.WithValue(context.Background(), "SessionId", sessionId) ctx, store := InitializeTestStore(t)
ctx = context.WithValue(ctx, "SessionId", sessionId)
spdb := InitializeTestSubPrefixDb(t, ctx)
// Initialize MenuHandlers // Initialize MenuHandlers
h := &MenuHandlers{ h := &MenuHandlers{
prefixDb: spdb, userdataStore: store,
ReplaceSeparatorFunc: mockReplaceSeparator, ReplaceSeparatorFunc: mockReplaceSeparator,
} }
mockSyms := []byte("1:SRF\n2:MILO") mockSyms := []byte("1:SRF\n2:MILO")
// Put voucher sym data from the store // 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 { if err != nil {
t.Fatal(err) t.Fatal(err)
} }