Exemple #1
0
        public void TestCRUD()
        {
            Webhook webhook = Webhook.Create(new Dictionary <string, object>()
            {
                { "url", "https://www.foobar.com" }
            });

            Assert.AreEqual(webhook.url, "https://www.foobar.com");

            webhook.Update();

            List <Webhook> webhooks = Webhook.List();

            CollectionAssert.Contains(webhooks.Select(w => w.id).ToList(), webhook.id);

            webhook.Destroy();
            try {
                User.Retrieve(webhook.id);
                Assert.Fail();
            }
            catch (HttpException) { }
        }