Sha256: e99c9c58a14b9cf829b3d3cad2a9b21396a8a742fe0502998eb3b30ca535d931

Contents?: true

Size: 786 Bytes

Versions: 12

Compression:

Stored size: 786 Bytes

Contents

require File.dirname(__FILE__) + '/../../../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

12 entries across 12 versions & 4 rubygems

Version Path
martinstannard-activemerchant-0.1.0 test/unit/integrations/helpers/bogus_helper_test.rb
seamusabshere-active_merchant-1.4.2.1 test/unit/integrations/helpers/bogus_helper_test.rb
seamusabshere-active_merchant-1.4.2.3 test/unit/integrations/helpers/bogus_helper_test.rb
activemerchant-1.2.0 test/unit/integrations/helpers/bogus_helper_test.rb
activemerchant-1.3.1 test/unit/integrations/helpers/bogus_helper_test.rb
activemerchant-1.3.0 test/unit/integrations/helpers/bogus_helper_test.rb
activemerchant-1.3.2 test/unit/integrations/helpers/bogus_helper_test.rb
activemerchant-1.4.1 test/unit/integrations/helpers/bogus_helper_test.rb
activemerchant-1.2.1 test/unit/integrations/helpers/bogus_helper_test.rb
activemerchant-1.4.0 test/unit/integrations/helpers/bogus_helper_test.rb
activemerchant-1.4.2 test/unit/integrations/helpers/bogus_helper_test.rb
spree-0.2.0 vendor/plugins/active_merchant/test/unit/integrations/helpers/bogus_helper_test.rb