feat: add payout account review flow
This commit is contained in:
@@ -247,6 +247,7 @@ func (s *CreatorTestSuite) Test_PayoutAccount() {
|
||||
So(err, ShouldBeNil)
|
||||
So(len(list), ShouldEqual, 1)
|
||||
So(list[0].Account, ShouldEqual, "user@example.com")
|
||||
So(list[0].Status, ShouldEqual, consts.PayoutAccountStatusPending)
|
||||
|
||||
// Remove
|
||||
err = Creator.RemovePayoutAccount(ctx, tenantID, u.ID, list[0].ID)
|
||||
@@ -285,10 +286,11 @@ func (s *CreatorTestSuite) Test_Withdraw() {
|
||||
pa := &models.PayoutAccount{
|
||||
TenantID: t.ID,
|
||||
UserID: u.ID,
|
||||
Type: "bank",
|
||||
Type: consts.PayoutAccountTypeBank,
|
||||
Name: "Bank",
|
||||
Account: "123",
|
||||
Realname: "Creator",
|
||||
Status: consts.PayoutAccountStatusApproved,
|
||||
}
|
||||
models.PayoutAccountQuery.WithContext(ctx).Create(pa)
|
||||
|
||||
@@ -316,7 +318,7 @@ func (s *CreatorTestSuite) Test_Withdraw() {
|
||||
var snap fields.OrdersWithdrawalSnapshot
|
||||
So(json.Unmarshal(o.Snapshot.Data().Data, &snap), ShouldBeNil)
|
||||
So(snap.AccountID, ShouldEqual, pa.ID)
|
||||
So(snap.AccountType, ShouldEqual, pa.Type)
|
||||
So(snap.AccountType, ShouldEqual, string(pa.Type))
|
||||
So(snap.AccountName, ShouldEqual, pa.Name)
|
||||
So(snap.Account, ShouldEqual, pa.Account)
|
||||
So(snap.AccountRealname, ShouldEqual, pa.Realname)
|
||||
|
||||
Reference in New Issue
Block a user