Skip to content

Commit

Permalink
bring in http/pubsub/eventbridge registration error into loop
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-liuu committed Nov 4, 2024
1 parent cf49964 commit f85a612
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions test/webhooks/registry_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ def setup
metafield_namespaces: ["namespace1", "namespace2", "namespace3"],
)
end

define_method("test_raises_on_#{protocol}_registration_check_error_with_address_#{address}") do
do_registration_check_error_test(protocol, address)
end
end
end

Expand Down Expand Up @@ -227,18 +231,6 @@ def test_process_no_handler
end
end

def test_raises_on_http_registration_check_error
do_registration_check_error_test(:http, "test-webhooks")
end

def test_raises_on_pubsub_registration_check_error
do_registration_check_error_test(:pub_sub, "pubsub://my-project-id:my-topic-id")
end

def test_raises_on_eventbridge_registration_check_error
do_registration_check_error_test(:event_bridge, "test-webhooks")
end

def test_register_topic_not_not_registry
assert_raises(ShopifyAPI::Errors::InvalidWebhookRegistrationError) do
ShopifyAPI::Webhooks::Registry.register(topic: "not-registered", session: @session)
Expand Down

0 comments on commit f85a612

Please sign in to comment.