remove the subprefix db from TestGetVoucherList
This commit is contained in:
parent
71c01e00cd
commit
b8d53f82bb
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user