规范气站与配送点提现渠道
This commit is contained in:
15
backend/api/internal/logic/common/withdrawal_channel_test.go
Normal file
15
backend/api/internal/logic/common/withdrawal_channel_test.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package common
|
||||
|
||||
import "testing"
|
||||
|
||||
// TestIsSupportedOrganizationWithdrawalChannel 验证组织端只开放银行卡提现。
|
||||
func TestIsSupportedOrganizationWithdrawalChannel(t *testing.T) {
|
||||
if !IsSupportedOrganizationWithdrawalChannel("bank") {
|
||||
t.Fatal("银行卡提现渠道应当可用")
|
||||
}
|
||||
for _, channel := range []string{"alipay", "wechat", "", " bank "} {
|
||||
if IsSupportedOrganizationWithdrawalChannel(channel) {
|
||||
t.Fatalf("未开放的提现渠道不应通过校验:%q", channel)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user