client_response.rb 439 B

1234567891011121314
  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