Sha256: e457aa378f1c060137b457f51eb87945ed219627081c60e814f632e874edc920

Contents?: true

Size: 976 Bytes

Versions: 4

Compression:

Stored size: 976 Bytes

Contents

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

4 entries across 4 versions & 3 rubygems

Version Path
martinstannard-activemerchant-0.1.0 generators/integration/templates/notification_test.rb
seamusabshere-active_merchant-1.4.2.1 generators/integration/templates/notification_test.rb
seamusabshere-active_merchant-1.4.2.3 generators/integration/templates/notification_test.rb
spree-0.2.0 vendor/plugins/active_merchant/generators/integration/templates/notification_test.rb