| | |
| | | void shouldMarkGuideCancelledAndRemoveCurrentSession() { |
| | | GuideUser user = new GuideUser(); |
| | | user.setId(8L); |
| | | user.setUsername("13800138000"); |
| | | user.setMobile("13800138000"); |
| | | user.setCertificateNo("CERT-8"); |
| | | user.setIdCardNo("11010519491231002X"); |
| | | user.setStatus(GuideUserService.STATUS_ENABLED); |
| | | user.setAutoDisableWhitelisted(1); |
| | | when(tourOrderMapper.selectCount(any())).thenReturn(0L); |
| | |
| | | verify(guideUserMapper).updateById(userCaptor.capture()); |
| | | assertThat(userCaptor.getValue().getStatus()).isEqualTo(GuideUserService.STATUS_CANCELLED); |
| | | assertThat(userCaptor.getValue().getAutoDisableWhitelisted()).isZero(); |
| | | assertThat(userCaptor.getValue().getUsername()).startsWith("deleted_").hasSize(32); |
| | | assertThat(userCaptor.getValue().getMobile()).isNull(); |
| | | assertThat(userCaptor.getValue().getCertificateNo()).isNull(); |
| | | assertThat(userCaptor.getValue().getIdCardNo()).isNull(); |
| | | verify(tokenSessionService).remove(payload); |
| | | } |
| | | } |