Files
hyperguild/internal/skills/org/handlers_test.go
T
mathiasandClaude Sonnet 5 b600cc986c
CI / Lint / Test / Vet (push) Failing after 5s
CI / Mirror to GitHub (push) Has been skipped
chore(module): rename module github.com/mathiasbq/supervisor -> git.d-ma.be/mathias/hyperguild (#42)
Aligns module path with canonical Gitea source (infra ADR-0004) and
repo name. Binary only, no downstream consumers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Roq1ajWKR5f1hG5Df9wC6A
2026-07-26 23:37:11 +02:00

30 lines
779 B
Go

// internal/skills/org/handlers_test.go
package org_test
import (
"context"
"encoding/json"
"testing"
"git.d-ma.be/mathias/hyperguild/internal/skills/org"
"git.d-ma.be/mathias/hyperguild/internal/tier"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestHandle_Tier_ReturnsTierInfo(t *testing.T) {
s := org.New(org.Config{
TierFn: func(ctx context.Context) tier.Info {
return tier.Info{Tier: tier.LANOnly, Label: "lan-only", ManagedAgents: false}
},
})
out, err := s.Handle(context.Background(), "tier", nil)
require.NoError(t, err)
var info tier.Info
require.NoError(t, json.Unmarshal(out, &info))
assert.Equal(t, tier.LANOnly, info.Tier)
assert.Equal(t, "lan-only", info.Label)
assert.False(t, info.ManagedAgents)
}