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.7.1 test/wx_pay/result_test.rb
wx_pay-0.7.0 test/wx_pay/result_test.rb
wx_pay-0.6.0 test/wx_pay/result_test.rb
wx_pay-0.5.0 test/wx_pay/result_test.rb
wx_pay_api-0.2.1 test/wx_pay/result_test.rb
wx_pay-0.4.1 test/wx_pay/result_test.rb
weixin_pay-0.2.0 test/wx_pay/result_test.rb
wx_pay-0.2.0 test/wx_pay/result_test.rb
wx_pay-0.1.0 test/wx_pay/result_test.rb
wx_pay-0.0.4 test/wx_pay/result_test.rb
wx_pay-0.0.3 test/wx_pay/result_test.rb
wx_pay-0.0.2 test/wx_pay/result_test.rb