package serve
import (
"testing"
"github.com/johannSo/codey/internal/approval"
)
// A prompt a standing ask rule insisted on is put to the client whatever the
// floor: the rule exists to stop a mode from settling it.
func TestTheFloorDoesNotSettleAForcedPrompt(t *testing.T) {
edit := approval.Request{Tool: "edit_file", Rememberable: true}
forced := edit
forced.Forced = "Edit(*.go) in .claude/settings.json"
for _, mode := range []PermissionMode{ModeAcceptEdits, ModeAuto, ModeFullAccess} {
if !mode.allows(edit) {
t.Errorf("%s should settle an ordinary edit", mode)
}
if mode.allows(forced) {
t.Errorf("%s settled a prompt an ask rule forced", mode)
}
}
}