修复bug
This commit is contained in:
1 parent
1850ac640e
commit
892ba5886d
20 files changed
+1078
-178
No files matched your search
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user