2012-04-11 15:08:04 +00:00
|
|
|
require File.expand_path("../test_helper", __FILE__)
|
2010-10-12 19:41:24 +00:00
|
|
|
|
|
|
|
class SupportTest < Test::Unit::TestCase
|
|
|
|
|
|
|
|
def test_command_response_succeeds
|
|
|
|
assert Support.ok?('ok' => 1)
|
|
|
|
assert Support.ok?('ok' => 1.0)
|
|
|
|
assert Support.ok?('ok' => true)
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_command_response_fails
|
|
|
|
assert !Support.ok?('ok' => 0)
|
|
|
|
assert !Support.ok?('ok' => 0.0)
|
|
|
|
assert !Support.ok?('ok' => 0.0)
|
|
|
|
assert !Support.ok?('ok' => 'str')
|
|
|
|
assert !Support.ok?('ok' => false)
|
|
|
|
end
|
|
|
|
end
|