Sha256: 1aee88b37f0c4cbbc8b2b164270d3a6608191d3a8d578bb39666d4894781ae27

Contents?: true

Size: 541 Bytes

Versions: 32

Compression:

Stored size: 541 Bytes

Contents

require 'test_helper'

class WxPay::ResultTest < MiniTest::Test
  def test_success_method_with_true
    r = WxPay::Result.new(
      Hash.from_xml(
        <<-XML
        <xml>
          <return_code>SUCCESS</return_code>
          <result_code>SUCCESS</result_code>
        </xml>
        XML
      ))

    assert_equal r.success?, true
  end

  def test_success_method_with_false
    r = WxPay::Result.new(
      Hash.from_xml(
        <<-XML
        <xml>
        </xml>
        XML
      ))

    assert_equal r.success?, false
  end
end

Version data entries

32 entries across 32 versions & 3 rubygems

Version Path
wx_pay-0.21.0 test/wx_pay/result_test.rb
wx_pay-0.20.1 test/wx_pay/result_test.rb
wx_pay-0.20.0 test/wx_pay/result_test.rb
wx_pay-0.19.0 test/wx_pay/result_test.rb
wx_pay-0.18.0 test/wx_pay/result_test.rb
wx_pay-0.17.0 test/wx_pay/result_test.rb
wx_pay-0.16.1 test/wx_pay/result_test.rb
wx_pay-0.16.0 test/wx_pay/result_test.rb
wx_pay-0.15.0 test/wx_pay/result_test.rb
wx_pay-0.14.2 test/wx_pay/result_test.rb
wx_pay-0.14.1 test/wx_pay/result_test.rb
wx_pay-0.14.0 test/wx_pay/result_test.rb
wx_pay-0.13.0 test/wx_pay/result_test.rb
wx_pay-0.12.0 test/wx_pay/result_test.rb
wx_pay-0.11.0 test/wx_pay/result_test.rb
wx_pay-0.10 test/wx_pay/result_test.rb
wx_pay-0.9.1 test/wx_pay/result_test.rb
wx_pay-0.9.0 test/wx_pay/result_test.rb
wx_pay-0.8.1 test/wx_pay/result_test.rb
wx_pay-0.8.0 test/wx_pay/result_test.rb