Sha256: 6f5074afa0d6106f72af7867e0624ac04f63e17e36fe086ebcfb69e684148fb5

Contents?: true

Size: 941 Bytes

Versions: 10

Compression:

Stored size: 941 Bytes

Contents

require 'test_helper'

class <%= class_name %>NotificationTest < Test::Unit::TestCase
  include ActiveMerchant::Billing::Integrations

  def setup
    @<%= name %> = <%= class_name %>::Notification.new(http_raw_data)
  end

  def test_accessors
    assert @<%= name %>.complete?
    assert_equal "", @<%= name %>.status
    assert_equal "", @<%= name %>.transaction_id
    assert_equal "", @<%= name %>.item_id
    assert_equal "", @<%= name %>.gross
    assert_equal "", @<%= name %>.currency
    assert_equal "", @<%= name %>.received_at
    assert @<%= name %>.test?
  end

  def test_compositions
    assert_equal Money.new(3166, 'USD'), @<%= name %>.amount
  end

  # Replace with real successful acknowledgement code
  def test_acknowledgement    

  end

  def test_send_acknowledgement
  end

  def test_respond_to_acknowledge
    assert @<%= name %>.respond_to?(:acknowledge)
  end

  private
  def http_raw_data
    ""
  end  
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
johnideal-activemerchant-1.4.10 generators/integration/templates/notification_test.rb
johnideal-activemerchant-1.4.11 generators/integration/templates/notification_test.rb
johnideal-activemerchant-1.4.4 generators/integration/templates/notification_test.rb
johnideal-activemerchant-1.4.5 generators/integration/templates/notification_test.rb
johnideal-activemerchant-1.4.6 generators/integration/templates/notification_test.rb
johnideal-activemerchant-1.4.7 generators/integration/templates/notification_test.rb
johnideal-activemerchant-1.4.8 generators/integration/templates/notification_test.rb
smulube-activemerchant-1.5.1.4 generators/integration/templates/notification_test.rb
smulube-activemerchant-1.5.1.3 generators/integration/templates/notification_test.rb
smulube-activemerchant-1.5.1.2 generators/integration/templates/notification_test.rb