Skip to content

Commit

Permalink
add method that calls register_all in api (Shopify#1743)
Browse files Browse the repository at this point in the history
* add method that calls register_all in api

* Changelog

* explict argument hash style

* rubocop
  • Loading branch information
nelsonwittwer authored Oct 31, 2023
1 parent 0eec265 commit 40aaa60
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Unreleased
----------
* Fixes bug with `WebhooksManager#recreate_webhooks!` where we failed to register topics in the registry[#1743](https://github.com/Shopify/shopify_app/pull/1704)

21.7.0 (Oct 12, 2023)
----------
Expand Down
1 change: 1 addition & 0 deletions lib/shopify_app/managers/webhooks_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def recreate_webhooks!(session:)

ShopifyApp::Logger.debug("Recreating webhooks")
add_registrations
create_webhooks(session: session)
end

def destroy_webhooks(session:)
Expand Down
1 change: 1 addition & 0 deletions test/shopify_app/managers/webhooks_manager_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class ShopifyApp::WebhooksManagerTest < ActiveSupport::TestCase

ShopifyApp::WebhooksManager.expects(:destroy_webhooks)
ShopifyApp::WebhooksManager.expects(:add_registrations)
ShopifyApp::WebhooksManager.expects(:create_webhooks).with(session: session)

ShopifyApp::WebhooksManager.recreate_webhooks!(session: session)
end
Expand Down

0 comments on commit 40aaa60

Please sign in to comment.