diff --git a/app/models/webhook.rb b/app/models/webhook.rb index 9fbdada34..10d2e383d 100644 --- a/app/models/webhook.rb +++ b/app/models/webhook.rb @@ -10,8 +10,9 @@ class Webhook < ApplicationRecord card_assigned card_closed card_collection_changed - card_created - card_popped + card_due_date_added + card_due_date_changed + card_due_date_removed card_published card_reopened card_staged diff --git a/test/controllers/webhooks_controller_test.rb b/test/controllers/webhooks_controller_test.rb index 54d50a31b..80b4f5869 100644 --- a/test/controllers/webhooks_controller_test.rb +++ b/test/controllers/webhooks_controller_test.rb @@ -30,7 +30,7 @@ class WebhooksControllerTest < ActionDispatch::IntegrationTest webhook: { name: "Test Webhook", url: "https://example.com/webhook", - subscribed_actions: [ "", "card_created", "card_closed" ] + subscribed_actions: [ "", "card_published", "card_closed" ] } } end @@ -41,7 +41,7 @@ class WebhooksControllerTest < ActionDispatch::IntegrationTest assert_equal collection, webhook.collection assert_equal "Test Webhook", webhook.name assert_equal "https://example.com/webhook", webhook.url - assert_equal [ "card_created", "card_closed" ], webhook.subscribed_actions + assert_equal [ "card_published", "card_closed" ], webhook.subscribed_actions end test "create with invalid params" do @@ -70,7 +70,7 @@ class WebhooksControllerTest < ActionDispatch::IntegrationTest patch collection_webhook_path(webhook.collection, webhook), params: { webhook: { name: "Updated Webhook", - subscribed_actions: [ "card_created" ] + subscribed_actions: [ "card_published" ] } } @@ -78,7 +78,7 @@ class WebhooksControllerTest < ActionDispatch::IntegrationTest assert_redirected_to collection_webhook_path(webhook.collection, webhook) assert_equal "Updated Webhook", webhook.name - assert_equal [ "card_created" ], webhook.subscribed_actions + assert_equal [ "card_published" ], webhook.subscribed_actions end test "update with invalid params" do