Skip to content

Commit

Permalink
Add test for androidpayResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhilong Hou committed Jan 18, 2017
1 parent 5483aef commit b644120
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/unit/test_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,18 @@ def test_logged_in_user
LitleXmlMapper.expects(:request).with(regexp_matches(/.*(loggedInUser="gdake".*merchantSdk="Ruby;8.14.0")|(merchantSdk="Ruby;8.14.0".*loggedInUser="gdake").*/m), is_a(Hash))
LitleOnlineRequest.new.register_token_request(hash)
end

def test_androidpay
hash = {
'merchantId' => '101',
'version'=>'8.8',
'reportGroup'=>'Planets',
'orderId'=>'androidpay',
'accountNumber'=>'1233456789103801'
}
LitleXmlMapper.expects(:request).with(regexp_matches(/.*<orderId>androidpay<\/orderId>.*<accountNumber>1233456789103801<\/accountNumber>.*/m), is_a(Hash))
LitleOnlineRequest.new.register_token_request(hash)
end

end

end

0 comments on commit b644120

Please sign in to comment.