feat: 支持从失败状态重新发起退款,添加相关逻辑和测试用例
This commit is contained in:
@@ -220,6 +220,14 @@ func (s *ContentTestSuite) Test_AttachAsset() {
|
||||
So(appErr.Code, ShouldEqual, errorx.ErrPreconditionFailed.Code)
|
||||
})
|
||||
|
||||
Convey("preview role 绑定 main variant 应被拒绝", func() {
|
||||
_, err := Content.AttachAsset(ctx, tenantID, userID, content.ID, asset.ID, consts.ContentAssetRolePreview, 1, now)
|
||||
So(err, ShouldNotBeNil)
|
||||
var appErr *errorx.AppError
|
||||
So(errors.As(err, &appErr), ShouldBeTrue)
|
||||
So(appErr.Code, ShouldEqual, errorx.ErrPreconditionFailed.Code)
|
||||
})
|
||||
|
||||
Convey("main role 绑定 preview variant 应被拒绝", func() {
|
||||
previewAsset := &models.MediaAsset{
|
||||
TenantID: tenantID,
|
||||
|
||||
Reference in New Issue
Block a user