Sha256: fafa2558667033f5883c21558dce3e63ad0bdab21666ab94dcfd90513f8c681c

Contents?: true

Size: 715 Bytes

Versions: 14

Compression:

Stored size: 715 Bytes

Contents

require 'test_helper'

class ErrorTest < Minitest::Test

  def error_response
    Gillbus::SessionLogin::Response.parse_string(File.read('test/responses/error.xml'))
  end

  def malformed_response
    Gillbus::SessionLogin::Response.parse_string('not an xml')
  end

  def malformed_response_2
    Gillbus::SessionLogin::Response.parse_string('<NOTDATA></NOTDATA>')
  end

  def test_errorness
    assert error_response.error?
    assert_equal 4, error_response.error_code
    assert_equal "Session not created error!", error_response.error_message
  end

  def test_malformed_errorness
    assert malformed_response.error?
  end

  def test_malformed_2_errorness
    assert malformed_response_2.error?
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
gillbus-0.14.10 test/error_test.rb
gillbus-0.14.9 test/error_test.rb
gillbus-0.14.8 test/error_test.rb
gillbus-0.14.7 test/error_test.rb
gillbus-0.14.6 test/error_test.rb
gillbus-0.14.5 test/error_test.rb
gillbus-0.14.4 test/error_test.rb
gillbus-0.14.3 test/error_test.rb
gillbus-0.14.2 test/error_test.rb
gillbus-0.14.1 test/error_test.rb
gillbus-0.14.0 test/error_test.rb
gillbus-0.13.0 test/error_test.rb
gillbus-0.12.0 test/error_test.rb
gillbus-0.11.0 test/error_test.rb