修复 SocialUserServiceTest 单测报错

This commit is contained in:
YunaiV 2022-11-11 00:35:19 +08:00
parent 59f0e75cba
commit 413656c043
1 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.system.service.social; package cn.iocoder.yudao.module.system.service.social;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.social.core.YudaoAuthRequestFactory;
import cn.iocoder.yudao.framework.test.core.ut.BaseDbAndRedisUnitTest; import cn.iocoder.yudao.framework.test.core.ut.BaseDbAndRedisUnitTest;
import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO;
import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialUserBindDO; import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialUserBindDO;
@ -8,7 +9,6 @@ import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialUserDO;
import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserBindMapper; import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserBindMapper;
import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserMapper; import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserMapper;
import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum;
import com.xkcoding.justauth.AuthRequestFactory;
import me.zhyd.oauth.enums.AuthResponseStatus; import me.zhyd.oauth.enums.AuthResponseStatus;
import me.zhyd.oauth.model.AuthCallback; import me.zhyd.oauth.model.AuthCallback;
import me.zhyd.oauth.model.AuthResponse; import me.zhyd.oauth.model.AuthResponse;
@ -46,7 +46,7 @@ public class SocialUserServiceTest extends BaseDbAndRedisUnitTest {
private SocialUserBindMapper socialUserBindMapper; private SocialUserBindMapper socialUserBindMapper;
@MockBean @MockBean
private AuthRequestFactory authRequestFactory; private YudaoAuthRequestFactory authRequestFactory;
@Test @Test
public void testGetAuthorizeUrl() { public void testGetAuthorizeUrl() {
@ -64,7 +64,7 @@ public class SocialUserServiceTest extends BaseDbAndRedisUnitTest {
// 调用 // 调用
String url = socialUserService.getAuthorizeUrl(type, redirectUri); String url = socialUserService.getAuthorizeUrl(type, redirectUri);
// 断言 // 断言
assertEquals("https://www.iocoder.cn/?redirect_uri=sss", url); assertEquals("https://www.iocoder.cn?redirect_uri=sss", url);
} }
} }