Sha256: 78afe79115beebf91240db6d5014543664eb3546a0b6727d3274cad8a155be78

Contents?: true

Size: 822 Bytes

Versions: 12

Compression:

Stored size: 822 Bytes

Contents

require 'test_helper'

class RemoteFindTranscriptTest < Test::Unit::TestCase

  def setup
    @environment = Spreedly::Environment.new(remote_test_environment_key, remote_test_access_secret)
  end

  def test_invalid_login
    assert_invalid_login do |environment|
      environment.find_transcript("SomeToken")
    end
  end

  def test_transaction_not_found
    assert_raise(Spreedly::NotFoundError) do
       @environment.find_transcript("SomeUnknownToken")
    end
  end

  def test_successfully_find_transcript
    gateway_token = @environment.add_gateway(:test).token
    card_token = create_failed_card_on(@environment).token
    transaction = @environment.purchase_on_gateway(gateway_token, card_token, 144)

    found = @environment.find_transcript(transaction.token)
    assert_kind_of(String, found)
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
spreedly-2.0.28 test/remote/remote_find_transcript_test.rb
spreedly-2.0.27 test/remote/remote_find_transcript_test.rb
spreedly-2.0.26 test/remote/remote_find_transcript_test.rb
spreedly-2.0.25 test/remote/remote_find_transcript_test.rb
spreedly-2.0.24 test/remote/remote_find_transcript_test.rb
spreedly-2.0.23 test/remote/remote_find_transcript_test.rb
spreedly-2.0.22 test/remote/remote_find_transcript_test.rb
spreedly-2.0.21 test/remote/remote_find_transcript_test.rb
spreedly-2.0.20 test/remote/remote_find_transcript_test.rb
spreedly-2.0.19 test/remote/remote_find_transcript_test.rb
spreedly-2.0.18 test/remote/remote_find_transcript_test.rb
spreedly-2.0.17 test/remote/remote_find_transcript_test.rb