fix SessionServiceTest testSignOut bug (add mock)

This commit is contained in:
loushang 2020-01-02 20:08:14 +08:00
parent 5949c8d6fb
commit 65bb0e03b7
1 changed files with 3 additions and 0 deletions

View File

@ -121,6 +121,9 @@ public class SessionServiceTest {
String ip = "127.0.0.1";
User user = new User();
user.setId(userId);
Mockito.when(sessionMapper.queryByUserIdAndIp(userId,ip)).thenReturn(getSession());
sessionService.signOut(ip ,user);
}