From 3d9eeddab88c14465b96fca7dc1614b478b1af9c Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Wed, 5 Feb 2025 19:07:35 +0300 Subject: [PATCH] Remove the Move to top node on empty input test case --- handlers/application/menuhandler.go | 1 - handlers/application/menuhandler_test.go | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/handlers/application/menuhandler.go b/handlers/application/menuhandler.go index 4518ba7..17acfe9 100644 --- a/handlers/application/menuhandler.go +++ b/handlers/application/menuhandler.go @@ -125,7 +125,6 @@ func (h *MenuHandlers) Init(ctx context.Context, sym string, input []byte) (reso h.st = h.pe.GetState() h.ca = h.pe.GetMemory() -`` sessionId, ok := ctx.Value("SessionId").(string) if ok { ctx = context.WithValue(ctx, "SessionId", sessionId) diff --git a/handlers/application/menuhandler_test.go b/handlers/application/menuhandler_test.go index 3bf66a4..2e426aa 100644 --- a/handlers/application/menuhandler_test.go +++ b/handlers/application/menuhandler_test.go @@ -175,20 +175,6 @@ func TestInit(t *testing.T) { input: []byte("1"), expectedResult: resource.Result{}, }, - { - name: "Move to top node on empty input", - setup: func() (*MenuHandlers, context.Context) { - pe := persist.NewPersister(testStore).WithSession(sessionId).WithContent(st, ca) - h := &MenuHandlers{ - flagManager: fm, - pe: pe, - } - st.Code = []byte("some pending bytecode") - return h, context.WithValue(ctx, "SessionId", sessionId) - }, - input: []byte(""), - expectedResult: resource.Result{}, - }, } for _, tt := range tests {