This commit is contained in:
2026-08-28 11:28:30 +08:00
parent 1e5ce54858
commit f998bed09c
9 changed files with 140 additions and 31 deletions
@@ -159,6 +159,8 @@ class PlatformUserManagementServiceTest {
assertEquals(900L, membership.getOverseasWarehouseId());
assertEquals(900L, response.overseasWarehouseId());
verify(auth).revokeSessions(eq("internal-token"), any());
verify(securityEvents).permissionChanged(10L, 0L, "PLATFORM",
"PLATFORM_USER_AUTHORIZATION_CHANGED");
}
@Test
@@ -195,6 +197,8 @@ class PlatformUserManagementServiceTest {
assertEquals(901L, response.overseasWarehouseId());
verify(auth).revokeSessions(eq("internal-token"),
eq(new AuthAccountClient.RevokeAccountSessionsRequest(Set.of(10L))));
verify(securityEvents).permissionChanged(10L, 0L, "PLATFORM",
"PLATFORM_USER_AUTHORIZATION_CHANGED");
}
@Test
@@ -209,6 +213,8 @@ class PlatformUserManagementServiceTest {
assertNull(response.overseasWarehouseId());
verify(auth).revokeSessions(eq("internal-token"),
eq(new AuthAccountClient.RevokeAccountSessionsRequest(Set.of(10L))));
verify(securityEvents).permissionChanged(10L, 0L, "PLATFORM",
"PLATFORM_USER_AUTHORIZATION_CHANGED");
}
@Test