@@ -46,6 +46,7 @@ def test_setup
4646 assert_equal ( "http" , ShopifyAPI ::Context . host_scheme )
4747 assert_equal ( "localhost" , ShopifyAPI ::Context . host_name )
4848 assert_equal ( "example.com" , ShopifyAPI ::Context . api_host )
49+ assert_equal ( { } , ShopifyAPI ::Context . httparty_params )
4950
5051 ShopifyAPI ::Context . setup (
5152 api_key : "key" ,
@@ -146,6 +147,39 @@ def test_with_host_name_and_no_host_env
146147 ENV [ "HOST" ] = old_host
147148 end
148149
150+ def test_with_httparty_params
151+ clear_context
152+
153+ ShopifyAPI ::Context . setup (
154+ api_key : "key" ,
155+ api_secret_key : "secret" ,
156+ api_version : "2023-10" ,
157+ scope : [ "scope1" , "scope2" ] ,
158+ is_private : true ,
159+ is_embedded : true ,
160+ log_level : :off ,
161+ private_shop : "privateshop.myshopify.com" ,
162+ user_agent_prefix : "user_agent_prefix1" ,
163+ old_api_secret_key : "old_secret" ,
164+ api_host : "example.com" ,
165+ httparty_params : {
166+ http_proxyaddr : "my.proxy.server" ,
167+ http_proxyport : 8000 ,
168+ http_proxyuser : "user" ,
169+ http_proxypass : "pass" ,
170+ } ,
171+ )
172+ assert_equal (
173+ {
174+ http_proxyaddr : "my.proxy.server" ,
175+ http_proxyport : 8000 ,
176+ http_proxyuser : "user" ,
177+ http_proxypass : "pass" ,
178+ } ,
179+ ShopifyAPI ::Context . httparty_params ,
180+ )
181+ end
182+
149183 def test_send_a_warning_if_log_level_is_invalid
150184 ShopifyAPI ::Context . stubs ( :log_level ) . returns ( :warn )
151185 ShopifyAPI ::Logger . expects ( :warn ) . with ( "not_a_level is not a valid log_level. " \
0 commit comments