Skip to content

Commit

Permalink
fix argument order of expected and actual value
Browse files Browse the repository at this point in the history
  • Loading branch information
Druwerd committed Oct 5, 2014
1 parent 335a39e commit 8e65107
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/test_hudson_config.rb
Expand Up @@ -9,17 +9,17 @@ def test_get
def test_set
test_url = "test.host.com"
Hudson[:url] = test_url
assert_equal(Hudson[:url], "http://#{test_url}")
assert_equal("http://#{test_url}", Hudson[:url])
end

def test_load_settings_hash
new_settings = {:url => 'test.com', :user => 'test', :password => 'test', :version => '1.00'}
Hudson.settings = new_settings
assert_equal(Hudson[:url], "http://#{new_settings[:url]}")
assert_equal(Hudson[:user], "test")
assert_equal(Hudson[:password], "test")
assert_equal(Hudson[:version], "1.00")
assert_equal(Hudson[:crumb], true)
assert_equal("http://#{new_settings[:url]}", Hudson[:url])
assert_equal("test", Hudson[:user])
assert_equal("test", Hudson[:password])
assert_equal("1.00", Hudson[:version])
assert_equal(true, Hudson[:crumb])
end

def test_auto_config
Expand All @@ -29,14 +29,14 @@ def test_auto_config
def test_when_crumb_is_false
new_settings = {:url => 'test.com', :user => 'test', :password => 'test', :version => '1.00', :crumb => false}
Hudson.settings = new_settings
assert_equal(Hudson[:crumb], false)
assert_equal(false, Hudson[:crumb])
end

def test_proxy_setting
new_settings = {:url => 'test.com', :user => 'test', :password => 'test', :version => '1.00', :proxy_host => 'test-proxy.com', :proxy_port => 9876}
Hudson.settings = new_settings
assert_equal(Hudson[:proxy_host], 'test-proxy.com')
assert_equal(Hudson[:proxy_port], 9876)
assert_equal('test-proxy.com', Hudson[:proxy_host])
assert_equal(9876, Hudson[:proxy_port])
end

end

0 comments on commit 8e65107

Please sign in to comment.