@@ -21,28 +21,24 @@ def test_new_nonempty_string
2121 end
2222
2323 def test_api_base
24- assert_equal 'http://api.local.dev:3000' , Trolley ::Configuration . new ( 'key' , 'secret' , 'integration' ) . apiBase
25- assert_equal 'https://api.trolley.com' , Trolley ::Configuration . new ( 'key' , 'secret' , 'production' ) . apiBase
26- assert_equal 'https://api.railz.io' , Trolley ::Configuration . new ( 'key' , 'secret' , 'development' ) . apiBase
27- assert_equal 'https://api.trolley.com' , Trolley ::Configuration . new ( 'key' , 'secret' , 'non_standard_environment' ) . apiBase
24+ assert_equal 'https://api.trolley.com' , Trolley ::Configuration . new ( 'key' , 'secret' ) . api_base
25+ assert_equal 'http://localhost:8080' , Trolley ::Configuration . new ( 'key' , 'secret' , api_base : 'http://localhost:8080' ) . api_base
2826 end
2927
3028 def test_use_ssl?
31- assert_equal false , Trolley ::Configuration . new ( 'key' , 'secret' , 'integration' ) . useSsl?
32- assert_equal true , Trolley ::Configuration . new ( 'key' , 'secret' , 'production' ) . useSsl?
33- assert_equal true , Trolley ::Configuration . new ( 'key' , 'secret' , 'development' ) . useSsl?
34- assert_equal true , Trolley ::Configuration . new ( 'key' , 'secret' , 'non_standard_environment' ) . useSsl?
29+ assert_equal false , Trolley ::Configuration . new ( 'key' , 'secret' , api_base : 'http://example.com' ) . useSsl?
30+ assert_equal true , Trolley ::Configuration . new ( 'key' , 'secret' ) . useSsl?
3531 end
3632
3733 def test_invalid_proxy_uri
3834 proxy_uri = 'not_://*a_valid_proxy'
3935 assert_raise Trolley ::Configuration ::InvalidProxyAddress . new ( "Invalid proxy provided to configuration: #{ proxy_uri } " ) do
40- Trolley ::Configuration . new ( 'k' , 's' , 'production' , proxy_uri : proxy_uri ) . proxy
36+ Trolley ::Configuration . new ( 'k' , 's' , proxy_uri : proxy_uri ) . proxy
4137 end
4238 end
4339
4440 def test_vaid_proxy_uri
45- config = Trolley ::Configuration . new ( 'k' , 's' , 'production' , proxy_uri : 'http://user:pass@gimmeproxy.com:80' )
41+ config = Trolley ::Configuration . new ( 'k' , 's' , proxy_uri : 'http://user:pass@gimmeproxy.com:80' )
4642 assert_equal 'gimmeproxy.com' , config . proxy . host
4743 assert_equal 80 , config . proxy . port
4844 assert_equal 'user' , config . proxy . user
0 commit comments