Files
felhom.eu/hub/internal/api/d62_restore_copy_event_test.go
T

20 lines
766 B
Go

package api
import (
"testing"
"gitea.dooplex.hu/admin/felhom-hub/internal/notify"
)
// D62 (operator 2026-10-29): the household's „Törlés most" on a restore copy sends restore_copy_deleted (who, app,
// date, size). It is accepted from a box (an unlisted type is a 400 and the record is lost) AND operator-only — both
// registers, same commit. RED-PROOF: seen failing before either entry existed.
func TestD62_RestoreCopyDeletedIsAllowedAndOperatorOnly(t *testing.T) {
if !allowedEventTypes["restore_copy_deleted"] {
t.Errorf("restore_copy_deleted is not in allowedEventTypes — POST /event would 400 and the record would be lost")
}
if !notify.IsOperatorOnly("restore_copy_deleted") {
t.Errorf("restore_copy_deleted is not operator-only")
}
}