Sha256: f7dbdfa8a122006dac8cc1121ac3fb9cfa20bad3970b3c2b90f39c4d5df61519

Contents?: true

Size: 443 Bytes

Versions: 8

Compression:

Stored size: 443 Bytes

Contents

require 'test_helper'

class Alipay::Sign::WapTest < Test::Unit::TestCase
  def setup
    @params = {
      :v => '1.0',
      :sec_id => 'MD5',
      :service => 'test',
      :notify_data => 'notify_data'
    }
    @sign = Digest::MD5.hexdigest("service=test&v=1.0&sec_id=MD5&notify_data=notify_data#{Alipay.key}")
  end

  def test_verify_sign
    assert Alipay::Sign::Wap.verify?(@params.merge(:sign => @sign, :whatever => 'x'))
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
alipay-0.5.0 test/alipay/sign/wap_test.rb
alipay-0.4.1 test/alipay/sign/wap_test.rb
alipay-0.4.0 test/alipay/sign/wap_test.rb
alipay-0.3.1 test/alipay/sign/wap_test.rb
alipay-0.3.0 test/alipay/sign/wap_test.rb
alipay-0.2.0 test/alipay/sign/wap_test.rb
alipay-0.1.0 test/alipay/sign/wap_test.rb
alipay-0.0.5 test/alipay/sign/wap_test.rb