MCPcopy Index your code
hub / github.com/codehamr/codehamr / TestHamrpassNoArgsShowsSetWhenKeyPresent

Function TestHamrpassNoArgsShowsSetWhenKeyPresent

internal/tui/tui_test.go:2940–2951  ·  view source on GitHub ↗

TestHamrpassNoArgsShowsSetWhenKeyPresent: status line flips to `set` when the hamrpass profile already has a key.

(t *testing.T)

Source from the content-addressed store, hash-verified

2938 // Bootstrap seeds hamrpass with an empty key; assert the precondition
2939 // so the test fails loud if Default() ever changes.
2940 if hp, ok := m.cfg.Models["hamrpass"]; !ok || hp.Key != "" {
2941 t.Fatalf("precondition: hamrpass profile with empty key, got %+v", hp)
2942 }
2943 m2, _ := m.runSlash("/hamrpass")
2944 final := m2.(Model)
2945 out := stripANSI(final.scroll.String())
2946 for _, want := range []string{
2947 "hamrpass",
2948 "status : unset",
2949 "endpoint : https://codehamr.com",
2950 "llm : hamrpass",
2951 "https://codehamr.com",
2952 "/hamrpass <your key>",
2953 } {
2954 if !strings.Contains(out, want) {

Callers

nothing calls this directly

Calls 5

newTestModelFunction · 0.85
stripANSIFunction · 0.85
SaveMethod · 0.80
runSlashMethod · 0.80
StringMethod · 0.80

Tested by

no test coverage detected