forked from wanjia9506/soft_bot
webhook增加type参数:同步自测代码
This commit is contained in:
parent
cfb8a3b89d
commit
016dc6f8e9
|
|
@ -57,7 +57,7 @@ public class GitLinkApiTest {
|
|||
|
||||
@Test
|
||||
public void addWebhook() throws JsonProcessingException {
|
||||
webhooks = new Webhook(true, "json", "GET", "123456", "http://localhost:10000", "*", new Object[]{"push"});
|
||||
webhooks = new Webhook(true, "json", "GET", "123456", "http://localhost:10000", "*", new Object[]{"push"}, "softbot");
|
||||
Object[] params = new Object[]{"xxq250", "ruoyi-vue-pro"};
|
||||
Response response = api.addWebhook(85175,params,webhooks);
|
||||
System.out.println(response.getData());
|
||||
|
|
@ -65,7 +65,7 @@ public class GitLinkApiTest {
|
|||
|
||||
@Test
|
||||
public void updateWebhook() throws JsonProcessingException {
|
||||
webhooks = new Webhook(false, "json", "GET", "123456", "http://localhost:10000", "*", new Object[]{"push"});
|
||||
webhooks = new Webhook(false, "json", "GET", "123456", "http://localhost:10000", "*", new Object[]{"push"}, "softbot");
|
||||
Object[] params = new Object[]{"xxq250", "ruoyi-vue-pro"};
|
||||
Response response = api.updateWebhook(85175,params,1082,webhooks);
|
||||
System.out.println(response.getData());
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class RestTemplateUtilTests {
|
|||
@BeforeEach
|
||||
public void setUp() {
|
||||
mapper = new ObjectMapper();
|
||||
webhooks = new Webhook(true, "json", "GET", "123456", "http://localhost:10000", "*", new Object[]{"push"});
|
||||
webhooks = new Webhook(true, "json", "GET", "123456", "http://localhost:10000", "*", new Object[]{"push"}, "softbot");
|
||||
headParams = new HashMap<>();
|
||||
headParams.put("Authorization", "Bearer "+TOKEN);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue