Sha256: c64ceed494f61d445da213d2e356997ff14d653874d0d6740d5c895a65e250f8

Contents?: true

Size: 589 Bytes

Versions: 7

Compression:

Stored size: 589 Bytes

Contents

require 'test/unit'
require 'mpower'

class TestMPower < Test::Unit::TestCase
  def test_checkout_invoice_items
    invoice = MPower::Checkout::Invoice.new
    invoice.add_item("Cart Item 1",1,10.00,10.00,"with optional description")
    invoice.add_item("Cart Item 2",5,5.00,25.00)
    invoice.total_amount = 55.00
    invoice.description = "Unit::Test Invoice from Ruby lang"
    assert_instance_of(Hash, invoice.get_items)
    assert_equal(2, invoice.get_items.size)
    assert_instance_of(Hash, invoice.get_items[:item_0])
    assert_equal(5, invoice.get_items[:item_0].size)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mpower-1.2.3 test/test_mpower.rb
mpower-1.2.2 test/test_mpower.rb
mpower-1.2.1 test/test_mpower.rb
mpower-1.2.0 test/test_mpower.rb
mpower-1.1.2 test/test_mpower.rb
mpower-1.1.1 test/test_mpower.rb
mpower-1.1.0 test/test_mpower.rb