Sha256: ad41263692306fb70f78c391e5a1588205f73f514d71b4c83c8452ff49fdc2a0

Contents?: true

Size: 820 Bytes

Versions: 13

Compression:

Stored size: 820 Bytes

Contents

require "test_helper"

class PaymentMethodAuthorizeNetTest < ActiveSupport::TestCase

  test "validations" do
    pm = NimbleshopAuthorizedotnet::Authorizedotnet.new(name: 'Authorize.net', description: 'this is description')
    refute pm.valid?
    expected = ["Company name on creditcard statement can't be blank", "Login can't be blank", "Transaction key can't be blank"]
    assert_equal expected, pm.errors.full_messages.sort
  end

  test "should save the record" do
    pm = NimbleshopAuthorizedotnet::Authorizedotnet.new(name: 'Authorize.net', description: 'this is description')
    pm.login_id = 'FWERSDEED093d'
    pm.transaction_key = 'SDFSDFSFSF423433SDFSFSSFSFSF334'
    pm.company_name_on_creditcard_statement = 'BigBinary LLC'
    assert pm.save
    assert_match /authorize-net/, pm.permalink
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
nimbleshop_core-0.0.5 test/unit/payment_method/authorizedotnet_test.rb
nimbleshop_core-0.0.4.beta1 test/unit/payment_method/authorizedotnet_test.rb
nimbleshop_core-0.0.4 test/unit/payment_method/authorizedotnet_test.rb
nimbleshop_core-0.0.3 test/unit/payment_method/authorizedotnet_test.rb
nimbleshop_core-0.0.2 test/unit/payment_method/authorizedotnet_test.rb
nimbleshop_core-0.0.2.beta1 test/unit/payment_method/authorizedotnet_test.rb
nimbleshop_core-0.0.1 test/unit/payment_method/authorizedotnet_test.rb
nimbleshop_core-0.0.1.rc6 test/unit/payment_method/authorizedotnet_test.rb
nimbleshop_core-0.0.1.rc5 test/unit/payment_method/authorizedotnet_test.rb
nimbleshop_core-0.0.1.rc4 test/unit/payment_method/authorizedotnet_test.rb
nimbleshop_core-0.0.1.rc3 test/unit/payment_method/authorizedotnet_test.rb
nimbleshop_core-0.0.1.rc2 test/unit/payment_method/authorizedotnet_test.rb
nimbleshop_core-0.0.1.rc1 test/unit/payment_method/authorizedotnet_test.rb