fix: stabilize backend tests
This commit is contained in:
@@ -139,10 +139,11 @@ func (s *CreatorTestSuite) Test_UpdateContent() {
|
||||
Create(&models.ContentPrice{TenantID: t.ID, UserID: u.ID, ContentID: c.ID, PriceAmount: 100})
|
||||
|
||||
Convey("should update content", func() {
|
||||
price := 20.00
|
||||
form := &creator_dto.ContentUpdateForm{
|
||||
Title: "New Title",
|
||||
Genre: "video",
|
||||
Price: 20.00,
|
||||
Price: &price,
|
||||
}
|
||||
err := Creator.UpdateContent(ctx, u.ID, c.ID, form)
|
||||
So(err, ShouldBeNil)
|
||||
@@ -260,7 +261,7 @@ func (s *CreatorTestSuite) Test_Withdraw() {
|
||||
models.TableNameTenantLedger,
|
||||
)
|
||||
|
||||
u := &models.User{Username: "creator6", Phone: "13700000006", Balance: 5000} // 50.00
|
||||
u := &models.User{Username: "creator6", Phone: "13700000006", Balance: 5000, IsRealNameVerified: true} // 50.00
|
||||
models.UserQuery.WithContext(ctx).Create(u)
|
||||
ctx = context.WithValue(ctx, consts.CtxKeyUser, u.ID)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user