Sha256: 8d931b3c8ef02c4f1ae7e9726d4a5b1d87f5cfed8edda1d94acb52be3c551a8a

Contents?: true

Size: 751 Bytes

Versions: 34

Compression:

Stored size: 751 Bytes

Contents

require 'test_helper'

class BogusHelperTest < Test::Unit::TestCase
  include ActiveMerchant::Billing::Integrations
  
  def setup
    @helper = Bogus::Helper.new('order-500','cfauser', :amount => 500, :currency => 'CAD')
  end

  def test_basic_helper_fields
    assert_field 'order', 'order-500'
    assert_field 'account', 'cfauser'
    assert_field 'amount', '500'
    assert_field 'currency', 'CAD'
  end
 
  def test_customer_fields 
    @helper.customer :first_name => 'Cody', :last_name => 'Fauser'
    assert_field 'first_name', 'Cody'
    assert_field 'last_name', 'Fauser'
  end

  def test_setting_unknown_field
    fields = @helper.fields.dup
    @helper.space_shuttle :name => 'Rockety'
    assert_equal fields, @helper.fields
  end
end

Version data entries

34 entries across 34 versions & 11 rubygems

Version Path
smulube-activemerchant-1.5.1.3 test/unit/integrations/helpers/bogus_helper_test.rb
smulube-activemerchant-1.5.1.2 test/unit/integrations/helpers/bogus_helper_test.rb
ghazel-activemerchant-1.4.2 test/unit/integrations/helpers/bogus_helper_test.rb
activemerchant-est-1.4.2.6 test/unit/integrations/helpers/bogus_helper_test.rb
activemerchant-1.5.0 test/unit/integrations/helpers/bogus_helper_test.rb
patmaddox-activemerchant-1.4.2.6 test/unit/integrations/helpers/bogus_helper_test.rb
patmaddox-activemerchant-1.4.2.5 test/unit/integrations/helpers/bogus_helper_test.rb
patmaddox-activemerchant-1.4.2.4 test/unit/integrations/helpers/bogus_helper_test.rb
patmaddox-activemerchant-1.4.2.3 test/unit/integrations/helpers/bogus_helper_test.rb
patmaddox-activemerchant-1.4.2.2 test/unit/integrations/helpers/bogus_helper_test.rb
patmaddox-activemerchant-1.4.2.1 test/unit/integrations/helpers/bogus_helper_test.rb
activemerchant-est-1.4.2.5 test/unit/integrations/helpers/bogus_helper_test.rb
patmaddox-activemerchant-1.4.2 test/unit/integrations/helpers/bogus_helper_test.rb
abtain_billing-1.0 test/unit/integrations/helpers/bogus_helper_test.rb