1. 修复 MemberAuthServiceTest 单元测试
2. 修复 DataPermissionDatabaseInterceptorTest 单元测试pull/2/head
parent
cb4224af12
commit
a539bc211d
|
@ -87,7 +87,7 @@ public class DataPermissionDatabaseInterceptorTest extends BaseMockitoUnitTest {
|
||||||
interceptor.beforeQuery(null, mappedStatement, null, null, null, boundSql);
|
interceptor.beforeQuery(null, mappedStatement, null, null, null, boundSql);
|
||||||
// 断言
|
// 断言
|
||||||
verify(mpBs, times(1)).sql(
|
verify(mpBs, times(1)).sql(
|
||||||
eq("SELECT * FROM t_user WHERE id = 1 AND dept_id = 100"));
|
eq("SELECT * FROM t_user WHERE id = 1 AND t_user.dept_id = 100"));
|
||||||
// 断言缓存
|
// 断言缓存
|
||||||
assertTrue(interceptor.getMappedStatementCache().getNoRewritableMappedStatements().isEmpty());
|
assertTrue(interceptor.getMappedStatementCache().getNoRewritableMappedStatements().isEmpty());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package cn.iocoder.yudao.module.member.service.auth;
|
package cn.iocoder.yudao.module.member.service.auth;
|
||||||
|
|
||||||
|
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||||
import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils;
|
import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils;
|
||||||
import cn.iocoder.yudao.framework.redis.config.YudaoRedisAutoConfiguration;
|
import cn.iocoder.yudao.framework.redis.config.YudaoRedisAutoConfiguration;
|
||||||
|
@ -39,6 +40,9 @@ public class MemberAuthServiceTest extends BaseDbAndRedisUnitTest {
|
||||||
|
|
||||||
// TODO @芋艿:登录相关的单测,待补全
|
// TODO @芋艿:登录相关的单测,待补全
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MemberAuthServiceImpl authService;
|
||||||
|
|
||||||
@MockBean
|
@MockBean
|
||||||
private MemberUserService userService;
|
private MemberUserService userService;
|
||||||
@MockBean
|
@MockBean
|
||||||
|
@ -50,11 +54,12 @@ public class MemberAuthServiceTest extends BaseDbAndRedisUnitTest {
|
||||||
@MockBean
|
@MockBean
|
||||||
private SocialUserApi socialUserApi;
|
private SocialUserApi socialUserApi;
|
||||||
@MockBean
|
@MockBean
|
||||||
|
private WxMaService wxMaService;
|
||||||
|
@MockBean
|
||||||
private PasswordEncoder passwordEncoder;
|
private PasswordEncoder passwordEncoder;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private MemberUserMapper memberUserMapper;
|
private MemberUserMapper memberUserMapper;
|
||||||
@Resource
|
|
||||||
private MemberAuthServiceImpl authService;
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdatePassword_success(){
|
public void testUpdatePassword_success(){
|
||||||
|
|
Loading…
Reference in New Issue