修复bug

This commit is contained in:
hero920103 committed 2026-10-19 17:34:11 +08:00
1 parent 1850ac640e
commit 892ba5886d
20 files changed
+1078 -178

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
package controllers
import "testing"
func TestCanEditReimbursement(t *testing.T) {
editable := []int8{
reimbursementStatusDraft,
reimbursementStatusRejected,
reimbursementStatusWithdrawn,
}
for _, status := range editable {
if !canEditReimbursement(status) {
t.Errorf("status %d should be editable", status)
}
}
locked := []int8{
reimbursementStatusApproving,
reimbursementStatusApproved,
reimbursementStatusPaid,
}
for _, status := range locked {
if canEditReimbursement(status) {
t.Errorf("status %d should not be editable", status)
}
}
}