test/alipay/notify_test.rb in alipay-0.5.0 vs test/alipay/notify_test.rb in alipay-0.6.0.beta1
- old
+ new
@@ -1,12 +1,13 @@
require 'test_helper'
-class Alipay::NotifyTest < Test::Unit::TestCase
+class Alipay::NotifyTest < Minitest::Test
def setup
@options = {
- :notify_id => '1234'
+ :notify_id => '1234',
+ :sign_type => 'MD5'
}
- @sign_options = @options.merge(:sign_type => 'MD5', :sign => Alipay::Sign.generate(@options))
+ @sign_options = @options.merge(:sign => Alipay::Sign.generate(@options))
end
def test_unsign_notify
FakeWeb.register_uri(:get, "https://mapi.alipay.com/gateway.do?service=notify_verify&partner=#{Alipay.pid}¬ify_id=1234", :body => "true")
assert !Alipay::Notify.verify?(@options)