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
johnideal-activemerchant-1.4.10 test/unit/integrations/helpers/bogus_helper_test.rb
johnideal-activemerchant-1.4.11 test/unit/integrations/helpers/bogus_helper_test.rb
johnideal-activemerchant-1.4.4 test/unit/integrations/helpers/bogus_helper_test.rb
johnideal-activemerchant-1.4.5 test/unit/integrations/helpers/bogus_helper_test.rb
johnideal-activemerchant-1.4.6 test/unit/integrations/helpers/bogus_helper_test.rb
johnideal-activemerchant-1.4.7 test/unit/integrations/helpers/bogus_helper_test.rb
johnideal-activemerchant-1.4.8 test/unit/integrations/helpers/bogus_helper_test.rb
mattbauer-activemerchant-1.4.2 test/unit/integrations/helpers/bogus_helper_test.rb
tomriley-active_merchant-1.4.2.3 test/unit/integrations/helpers/bogus_helper_test.rb
tomriley-active_merchant-1.4.2.4 test/unit/integrations/helpers/bogus_helper_test.rb
tomriley-active_merchant-1.4.2.5 test/unit/integrations/helpers/bogus_helper_test.rb
tomriley-active_merchant-1.4.2.6 test/unit/integrations/helpers/bogus_helper_test.rb
tomriley-active_merchant-1.4.2.7 test/unit/integrations/helpers/bogus_helper_test.rb
tomriley-active_merchant-1.4.2.8 test/unit/integrations/helpers/bogus_helper_test.rb
tomriley-tomriley-active_merchant-1.4.2.4 test/unit/integrations/helpers/bogus_helper_test.rb
goldstar-activemerchant-1.4.2.7 test/unit/integrations/helpers/bogus_helper_test.rb
goldstar-activemerchant-1.4.2.6 test/unit/integrations/helpers/bogus_helper_test.rb
tomriley-active_merchant-1.4.2.11 test/unit/integrations/helpers/bogus_helper_test.rb
tomriley-active_merchant-1.4.2.10 test/unit/integrations/helpers/bogus_helper_test.rb
smulube-activemerchant-1.5.1.4 test/unit/integrations/helpers/bogus_helper_test.rb