@@ -46,6 +46,7 @@ def test_setup
46
46
assert_equal ( "http" , ShopifyAPI ::Context . host_scheme )
47
47
assert_equal ( "localhost" , ShopifyAPI ::Context . host_name )
48
48
assert_equal ( "example.com" , ShopifyAPI ::Context . api_host )
49
+ assert_equal ( { } , ShopifyAPI ::Context . httparty_params )
49
50
50
51
ShopifyAPI ::Context . setup (
51
52
api_key : "key" ,
@@ -146,6 +147,39 @@ def test_with_host_name_and_no_host_env
146
147
ENV [ "HOST" ] = old_host
147
148
end
148
149
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
+
149
183
def test_send_a_warning_if_log_level_is_invalid
150
184
ShopifyAPI ::Context . stubs ( :log_level ) . returns ( :warn )
151
185
ShopifyAPI ::Logger . expects ( :warn ) . with ( "not_a_level is not a valid log_level. " \
0 commit comments