Commit 7a6ed66a authored by 赵然's avatar 赵然

zr

parent fd05188c
......@@ -27,7 +27,7 @@ public class 设置_应用信息_DuibaTest extends DuibaBase {
String appId = "19515";
//设置--保存应用信息
@Test
//@Test
public void 保存应用信息() throws Exception {
String appId = "19515";
String earnCreditsUrl = "https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&tn=baidu&wd=www.baidu.com";
......@@ -105,4 +105,13 @@ public class 设置_应用信息_DuibaTest extends DuibaBase {
logger.info("校验各种搜索成功");
}
@Test(description = "删除添加的管理员")
public void d_删除管理员() throws Exception{
Response response = updateAppInfoService.selectEmployeeList("","",appId);
String id = response.jsonPath().getString("data.list[1].id");
logger.info("员工id为:"+id);
response = updateAppInfoService.delete(appId,id);
logger.info("员工删除成功!");
}
}
......@@ -136,4 +136,22 @@ public class UpdateAppInfoService {
return response;
}
//删除管理员
public Response delete(String appId,String id) throws Exception {
String url = "http://" + hdHost + "/employee/delete";
Map<String, String> map = new HashMap<>();
map.put("id",id);
Response response = given().cookies(authorization.hdLoginSaas(appId)).params(map).get(url);
response.prettyPrint();
try {
Assert.assertEquals(response.jsonPath().getString("desc"), "成功");
} catch (Exception e) {
throw new Exception("/employee/delete失败,返回信息:" + response.asString());
} catch (Error er) {
throw new Exception("/employee/delete失败,返回信息:" + response.asString());
}
return response;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment