Authored by zhaoyue

MOD unbind openid

git pull
git add --all src/*
git add --all lib/*
#git add --all src/*
#git add --all lib/*
git add push.sh
git add pom.xml
git commit -m "add hasReport"
git commit -m "MOD unbind openid"
git push origin master
git status
git pull
... ...
... ... @@ -25,7 +25,7 @@ public class AdminOpLogTest {
Map<String, String> params = new HashMap<String, String>();
params.put("username", Constants.USR_ACC);
params.put("operation", Integer.toString(Constants.OP_NEWUSER_REGISTER));
params.put("operation", Integer.toString(Constants.OP_NEWUSER_DIAGNOSE));
params.put("t", HttpTools.getNow());
params.put("type", Constants.KEY_ID);
params.put("sign", HttpTools.getSign(params));
... ...
... ... @@ -22,8 +22,8 @@ public class AdminSetPulseBreathRateTest {
Map<String, String> params = new HashMap<String, String>();
params.put("username", Constants.USR_ACC);
params.put("pulse", "80");
params.put("breathrate", "19");
params.put("pulse", "111");
params.put("breathrate", "22");
params.put("type", Constants.KEY_ID);
params.put("t", HttpTools.getNow());
params.put("sign", HttpTools.getSign(params));
... ...
... ... @@ -45,16 +45,14 @@ public class OpenIdTest {
*/
@Test
public void testUnBind() {
String token = OpenIdTest.bindWithOpenIdAndLoginAndGetToken(Constants.USR_OPENID, Constants.USR_OPENID_TYPE);
Map<String, String> params = new HashMap<String, String>();
params.put("username", Constants.USR_ACC);
params.put("password", EncodeTools.encode("MD5", Constants.USR_PWD));
params.put("openId", Constants.USR_OPENID);
params.put("openIdType", Constants.USR_OPENID_TYPE);
params.put("t", HttpTools.getNow());
params.put("type", Constants.KEY_ID);
params.put("sign", HttpTools.getSign(params));
String response = HttpTools.requestByMap(URL_OPEN_ID, "DELETE", params);
String response = HttpTools.requestByMapWithToken(URL_OPEN_ID, "DELETE", params, token);
System.out.println(response);
Assert.assertTrue(RtnCodeTools.verifyCode(response, Constants.OPENID_UNBIND_SUCESS));
... ...