test/salesforce/config_test.rb in activeforce-1.9.1 vs test/salesforce/config_test.rb in activeforce-1.10.0

- old
+ new

@@ -37,21 +37,21 @@ end def test_config__on_login_failure assert_nil Salesforce::Config.on_login_failure - @my_stuff = 0 + my_stuff = 0 Salesforce.configure do - on_login_failure { @my_stuff = @my_stuff + 1 } + on_login_failure { my_stuff = my_stuff + 1 } end Salesforce::Config.on_login_failure - assert_equal 1, @my_stuff + assert_equal 1, my_stuff Salesforce::Config.on_login_failure - assert_equal 2, @my_stuff + assert_equal 2, my_stuff end def test_config__specific_api_version Salesforce.configure do username "foo" @@ -110,22 +110,26 @@ config.session_id "session_id" assert_equal "session_id", Salesforce::Config.session_id config.server_instance "na99" assert_equal "na99", Salesforce::Config.server_instance + + config.server_domain "something.salesforce.com" + assert_equal "something.salesforce.com", Salesforce::Config.server_domain config.user_id "user_id" assert_equal "user_id", Salesforce::Config.user_id assert_equal config.server_url, Salesforce::Config.server_url end def test_server_url__and_server_host config = Salesforce::Config.instance config.server_instance "sa2" + config.server_domain "something.salesforce.com" config.api_version 99 - assert_equal "https://sa2.salesforce.com/services/data/v99.0", Salesforce::Config.server_url - assert_equal "https://sa2.salesforce.com", Salesforce::Config.server_host + assert_equal "https://sa2.something.salesforce.com/services/data/v99.0", Salesforce::Config.server_url + assert_equal "https://sa2.something.salesforce.com", Salesforce::Config.server_host end def test_configured config = Salesforce::Config.instance assert_equal false, config.configured? @@ -158,6 +162,6 @@ def clean_config Salesforce::Config.instance_variable_set(:@instance, nil) end -end \ No newline at end of file +end