feat: add charge

This commit is contained in:
Rogee
2024-12-12 17:59:30 +08:00
parent 1bc12248aa
commit 259b334711
11 changed files with 143 additions and 14 deletions

View File

@@ -44,7 +44,7 @@ func Test_DiscoverMedias(t *testing.T) {
func (t *ServiceTestSuite) Test_Charge() {
Convey("Charge", t.T(), func() {
code, err := t.Svc.GenerateChargeCode(context.Background(), 1, 100)
code, err := t.Svc.GenerateChargeCode(context.Background(), 2, 100)
So(err, ShouldBeNil)
code = "b8TDWf59wvPw"
@@ -57,3 +57,12 @@ func (t *ServiceTestSuite) Test_Charge() {
So(err, ShouldBeNil)
})
}
// Test_GetTenantUserBalance
func (t *ServiceTestSuite) Test_GetTenantUserBalance() {
Convey("GetTenantUserBalance", t.T(), func() {
balance, err := t.Svc.GetTenantUserBalance(context.Background(), 1, 1)
So(err, ShouldBeNil)
So(balance, ShouldNotEqual, 0)
})
}