mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 13:42:07 +08:00
新增imes-token获取组织id接口
This commit is contained in:
+3
-3
@@ -208,15 +208,15 @@ class AuthControllerTest extends BaseWebUnitTest {
|
||||
|
||||
@Test
|
||||
void testGetOrganIdByAppToken() throws Exception {
|
||||
when(tokenConfigService.getOrganIdByAppToken("test-app-token")).thenReturn(100L);
|
||||
when(tokenConfigService.getOrganIdByAppToken("imes-test-app-token")).thenReturn(100L);
|
||||
|
||||
mockMvc.perform(post("/admin-api/system/auth/app-token/organ-id")
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content("{\"appToken\":\"test-app-token\"}"))
|
||||
.content("{\"appToken\":\"imes-test-app-token\"}"))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.data").value(100L));
|
||||
|
||||
verify(tokenConfigService, times(1)).getOrganIdByAppToken("test-app-token");
|
||||
verify(tokenConfigService, times(1)).getOrganIdByAppToken("imes-test-app-token");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user