test/remote_test.rb in ideal-0.2.0 vs test/remote_test.rb in ideal-0.9.0
- old
+ new
@@ -7,12 +7,14 @@
setup_ideal_gateway(fixtures('default'))
Ideal::Gateway.environment = :test
@gateway = Ideal::Gateway.new
+ @@issuer ||= @gateway.issuers.list[0]
+
@valid_options = {
- :issuer_id => '0151',
+ :issuer_id => @@issuer[:id],
:expiration_period => 'PT10M',
:return_url => 'http://return_to.example.com',
:order_id => '123456789012',
:currency => 'EUR',
:description => 'A classic Dutch windmill',
@@ -57,10 +59,13 @@
#
# See test_transaction_id for info on how the remote tests are ran.
#
def test_retrieval_of_issuers
- assert_equal [{ :id => '0151', :name => 'Issuer Simulator' }], @gateway.issuers.list
+ issuer_list = @gateway.issuers.list
+ assert_equal 1, issuer_list.length
+ assert_match /^Issuer\ Sim/, issuer_list[0][:name]
+ assert_match /^\d{4}$/, issuer_list[0][:id]
end
def test_successful_transaction
capture_transaction(:success)
assert_success capture_transaction(:success)
\ No newline at end of file