Commit f1e60999 authored by 赵然's avatar 赵然

zr

parent abdf6335
...@@ -30,9 +30,10 @@ public class 种红包配置校验_AccessTest extends DuibaTestBase{ ...@@ -30,9 +30,10 @@ public class 种红包配置校验_AccessTest extends DuibaTestBase{
//指定用户 //指定用户
private static int uid = 4689; private static int uid = 4689;
private static int uid2 = 4552; private static int uid2 = 4552;
private static int uid3 = 3590;
@Test @Test
public void 出券开关校验_() throws Exception { public void 出券衰减开关校验_() throws Exception {
//dafuweng登陆获取cookies //dafuweng登陆获取cookies
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
//校验种红包配置 //校验种红包配置
...@@ -62,7 +63,7 @@ public class 种红包配置校验_AccessTest extends DuibaTestBase{ ...@@ -62,7 +63,7 @@ public class 种红包配置校验_AccessTest extends DuibaTestBase{
} }
@Test @Test
public void 出券开关校验_() throws Exception { public void 出券衰减开关校验_() throws Exception {
//dafuweng登陆获取cookies //dafuweng登陆获取cookies
Map cookies = authorization.dafuwengLogin(uid2); Map cookies = authorization.dafuwengLogin(uid2);
//校验种红包配置 //校验种红包配置
...@@ -81,4 +82,24 @@ public class 种红包配置校验_AccessTest extends DuibaTestBase{ ...@@ -81,4 +82,24 @@ public class 种红包配置校验_AccessTest extends DuibaTestBase{
logger.info("种红包的红包配置接口校验正确"); logger.info("种红包的红包配置接口校验正确");
} }
@Test
public void 流量策略打开校验() throws Exception {
//dafuweng登陆获取cookies
Map cookies = authorization.dafuwengLogin(uid3);
//校验种红包配置
Response response = seedRedPacketService.getExtConfig(cookies);
response.prettyPrint();
String adPositions = response.jsonPath().getString("data.adPositions");
String adSwitch = response.jsonPath().getString("data.adSwitch");
String decrBeginTime = response.jsonPath().getString("data.decrBeginTime");
String decrSwitch = response.jsonPath().getString("data.decrSwitch");
Assert.assertNull(adPositions,"发券位置校验异常");
Assert.assertEquals(adSwitch,"false","种红包开关校验异常");
Assert.assertEquals(decrSwitch,"false","种红包衰减开关校验异常");
Assert.assertNull(decrBeginTime,"衰减时间校验异常");
logger.info("种红包的红包配置接口校验正确");
}
} }
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