test/alipay/service_test.rb in alipay-0.2.0 vs test/alipay/service_test.rb in alipay-0.3.0

- old
+ new

@@ -61,9 +61,26 @@ :total_fee => '0.0.1', } assert_not_nil Alipay::Service.create_forex_trade(options) end + def test_close_trade + response_body = <<-EOF + <?xml version="1.0" encoding="utf-8"?> + <alipay> + <is_success>T</is_success> + </alipay> + EOF + FakeWeb.register_uri( + :get, + %r|https://mapi\.alipay\.com/gateway\.do.*|, + :body => response_body + ) + + assert_equal response_body, Alipay::Service.close_trade( + :out_order_no => 'the-out-order-no' + ) + end def test_should_send_goods_confirm_by_platform body = <<-EOF <?xml version="1.0" encoding="utf-8"?> <alipay>