mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-29 03:26:37 +08:00
a79bbb80a8
Soft-delete restore/purge/list and the recycle_purge job are gone. Admin delete now removes library index rows, with an optional delete_files query that also deletes local media + sidecar NFO. UI copy is renamed from 移入回收站 to 删除, with a confirm checkbox. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: truewhile <truewhile@users.noreply.github.com>
24 lines
427 B
Go
24 lines
427 B
Go
package handler
|
|
|
|
import "testing"
|
|
|
|
func TestParseDeleteFilesQuery(t *testing.T) {
|
|
cases := []struct {
|
|
raw string
|
|
want bool
|
|
}{
|
|
{"", false},
|
|
{"0", false},
|
|
{"false", false},
|
|
{"1", true},
|
|
{"true", true},
|
|
{"TRUE", true},
|
|
{"yes", true},
|
|
}
|
|
for _, tc := range cases {
|
|
if got := parseDeleteFilesQuery(tc.raw); got != tc.want {
|
|
t.Fatalf("parseDeleteFilesQuery(%q)=%v, want %v", tc.raw, got, tc.want)
|
|
}
|
|
}
|
|
}
|