You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
439 B

  1. require_relative '../phalapi_client'
  2. require 'test/unit'
  3. class ClientResponseTest < Test::Unit::TestCase
  4. def test_new
  5. a_response = PhalApi::ClientResponse.new(400)
  6. assert_equal 400, a_response.ret
  7. a_response = PhalApi::ClientResponse.new(500, [], 'Server Error')
  8. assert_equal 500, a_response.ret
  9. assert_equal [], a_response.data
  10. assert_equal 'Server Error', a_response.msg
  11. end
  12. end