mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-09-03 00:47:14 +00:00
inbounds: allow custom monthly traffic reset days (#6071)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package service
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestNormalizeTrafficResetDay(t *testing.T) {
|
||||
tests := map[int]int{
|
||||
0: 1,
|
||||
1: 1,
|
||||
15: 15,
|
||||
31: 31,
|
||||
32: 31,
|
||||
}
|
||||
for input, want := range tests {
|
||||
if got := normalizeTrafficResetDay(input); got != want {
|
||||
t.Errorf("normalizeTrafficResetDay(%d) = %d, want %d", input, got, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user