2026-07-14 14:08:08 +08:00

36 lines
937 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package financewithdrawal
import (
"strings"
"testing"
)
func TestWithdrawalApplicationCreatedMarkdownKeepsFinanceReviewDetails(t *testing.T) {
message := withdrawalApplicationCreatedMarkdown(Application{
ID: 77,
AppCode: "lalu",
UserID: 42,
SalaryAssetType: "HOST_SALARY_USD",
WithdrawAmount: "50.00",
WithdrawMethod: MethodUSDTTRC20,
WithdrawAddress: "TRON-address",
FreezeTransactionID: "freeze-tx-1",
CreatedAtMS: 1_700_000_000_000,
})
for _, expected := range []string{
"用户提现申请待审核",
"申请ID77",
"APPlalu",
"用户ID42",
"提现金额:$ 50.00",
"提现方式usdt_trc20",
"冻结交易freeze-tx-1",
"https://admin-acc.global-interaction.com/finance/",
} {
if !strings.Contains(message, expected) {
t.Fatalf("withdrawal DingTalk message missing %q: %s", expected, message)
}
}
}