Don't try to generate payload body when there aren't any subscribers … (#11610)
commitdadad988ff65af809d0f60aceba2e392d947760e
authorDamian Legawiec <damian@sparksolutions.co>
Sat, 22 Jan 2022 13:39:26 +0000 (22 14:39 +0100)
committerGitHub <noreply@github.com>
Sat, 22 Jan 2022 13:39:26 +0000 (22 14:39 +0100)
tree7c7a99217808536103927b9cf78f073d26bdc77e
parent2da4b3bd4bd717386817053f2b8e9083a181bc29
Don't try to generate payload body when there aren't any subscribers … (#11610)

* Don't try to generate payload body when there aren't any subscribers for current event

* Fixed tests

* Update webhooks_spec.rb
api/app/models/concerns/spree/webhooks/has_webhooks.rb
api/spec/models/concerns/spree/webhooks/has_webhooks_spec.rb
api/spec/models/spree/api/webhooks/order_decorator_spec.rb
api/spec/models/spree/api/webhooks/payment_decorator_spec.rb
api/spec/models/spree/api/webhooks/product_decorator_spec.rb
api/spec/models/spree/api/webhooks/shipment_decorator_spec.rb
api/spec/models/spree/api/webhooks/stock_item_decorator_spec.rb
api/spec/models/spree/api/webhooks/stock_movement_decorator_spec.rb
api/spec/models/spree/api/webhooks/variant_decorator_spec.rb
api/spec/services/spree/webhooks_spec.rb