@@ -60,28 +60,29 @@ def setup
6060 assert_nil ( update_registration_response . body )
6161 end
6262
63- define_method ( "test_#{ protocol } _registration_add_and_update_on_ #{ address } " ) do
63+ define_method ( "test_#{ protocol } _add_registration_with_address_ #{ address } " ) do
6464 do_registration_test (
6565 queries [ protocol ] [ :check_empty_response ] ,
6666 queries [ protocol ] [ :register_add_query ] ,
6767 queries [ protocol ] [ :register_add_response ] ,
6868 protocol ,
6969 address ,
70+ fields : [ "field1" , "field2" ] ,
71+ metafield_namespaces : [ "namespace1" , "namespace2" ] ,
7072 )
7173 end
7274
73- define_method ( "test_#{ protocol } _registration_with_fields_add_and_update_on_#{ address } " ) do
74- # add webhook
75+ define_method ( "test_#{ protocol } _update_registration_address_with_original_address_#{ address } " ) do
7576 do_registration_test (
76- queries [ protocol ] [ :check_empty_response ] ,
77- queries [ protocol ] [ :register_add_query_with_fields ] ,
78- queries [ protocol ] [ :register_add_with_fields_response ] ,
77+ queries [ protocol ] [ :check_existing_response ] ,
78+ queries [ protocol ] [ :register_update_query ] ,
79+ queries [ protocol ] [ :register_update_response ] ,
7980 protocol ,
80- address ,
81- fields : "field1, field2" ,
81+ address + "-updated" ,
8282 )
83+ end
8384
84- # update webhook fields
85+ define_method ( "test_ #{ protocol } _update_registration_fields_with_address_ #{ address } " ) do
8586 do_registration_test (
8687 queries [ protocol ] [ :check_existing_response ] ,
8788 queries [ protocol ] [ :register_update_query_with_fields ] ,
@@ -92,18 +93,7 @@ def setup
9293 )
9394 end
9495
95- define_method ( "test_#{ protocol } _registration_with_fields_array_add_and_update_on_#{ address } " ) do
96- # add webhook
97- do_registration_test (
98- queries [ protocol ] [ :check_empty_response ] ,
99- queries [ protocol ] [ :register_add_query_with_fields ] ,
100- queries [ protocol ] [ :register_add_with_fields_response ] ,
101- protocol ,
102- address ,
103- fields : [ "field1" , "field2" ] ,
104- )
105-
106- # update webhook fields
96+ define_method ( "test_#{ protocol } _update_registration_fields_array_with_address_#{ address } " ) do
10797 do_registration_test (
10898 queries [ protocol ] [ :check_existing_response ] ,
10999 queries [ protocol ] [ :register_update_query_with_fields ] ,
@@ -114,18 +104,7 @@ def setup
114104 )
115105 end
116106
117- define_method ( "test_#{ protocol } _registration_with_metafield_namespaces_add_and_update_on_#{ address } " ) do
118- # add webhook
119- do_registration_test (
120- queries [ protocol ] [ :check_empty_response ] ,
121- queries [ protocol ] [ :register_add_query_with_metafield_namespaces ] ,
122- queries [ protocol ] [ :register_add_with_metafield_namespaces_response ] ,
123- protocol ,
124- address ,
125- metafield_namespaces : [ "namespace1" , "namespace2" ] ,
126- )
127-
128- # update webhook metafield namespaces
107+ define_method ( "test_#{ protocol } _update_registration_metafield_namespaces_with_address_#{ address } " ) do
129108 do_registration_test (
130109 queries [ protocol ] [ :check_existing_response ] ,
131110 queries [ protocol ] [ :register_update_query_with_metafield_namespaces ] ,
0 commit comments