From 59339e8563fa34ab136e4af84c23fbf7d9808282 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 04:20:53 +0100 Subject: [PATCH] test: HSD resolve validation + action count verification Co-Authored-By: Charon --- actions_test.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/actions_test.go b/actions_test.go index dcb1da1..4bfa6dd 100644 --- a/actions_test.go +++ b/actions_test.go @@ -99,3 +99,26 @@ func TestAction_RegisterAll_Good(t *testing.T) { if !c.Action("blockchain.asset.info").Exists() { t.Error("asset.info not registered") } if !c.Action("blockchain.forge.release").Exists() { t.Error("forge.release not registered") } } + +func TestAction_HSDResolve_Bad_NoName(t *testing.T) { + handler := makeHSDResolve("http://127.0.0.1:14037", "testkey") + result := handler(context.Background(), core.Options{}) + if result.OK { + t.Error("should fail without name") + } +} + +func TestAction_RegisterAllActions_Good_Count(t *testing.T) { + c := core.New() + // Can't call RegisterAllActions with nil chain for some actions + // but we can verify the action count + RegisterWalletActions(c) + RegisterCryptoActions(c) + RegisterAssetActions(c) + RegisterForgeActions(c) + + allActions := c.Actions() + if len(allActions) < 14 { + t.Errorf("expected 14+ actions, got %d", len(allActions)) + } +}