Sha256: 3fc63c7ef017cfdef0b591573a9e82dcd57518a64af81049c9ae0bc16713ba7f

Contents?: true

Size: 738 Bytes

Versions: 22

Compression:

Stored size: 738 Bytes

Contents

require File.expand_path('../../test_helper', __FILE__)

module Stripe
  class ApplicationFeeTest < Test::Unit::TestCase
    should "application fees should be listable" do
      @mock.expects(:get).once.returns(test_response(test_application_fee_array))
      fees = Stripe::ApplicationFee.all
      assert fees.data.kind_of? Array
      fees.each do |fee|
        assert fee.kind_of?(Stripe::ApplicationFee)
      end
    end

    should "application fees should be refundable" do
      @mock.expects(:get).never
      @mock.expects(:post).once.returns(test_response({:id => "fee_test_fee", :refunded => true}))
      fee = Stripe::ApplicationFee.new("test_application_fee")
      fee.refund
      assert fee.refunded
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
stripe-1.22.0 test/stripe/application_fee_test.rb
stripe-1.21.0 test/stripe/application_fee_test.rb
stripe-1.20.4 test/stripe/application_fee_test.rb
stripe-1.20.3 test/stripe/application_fee_test.rb
stripe-1.20.2 test/stripe/application_fee_test.rb
stripe-1.20.1 test/stripe/application_fee_test.rb
stripe-1.20.0 test/stripe/application_fee_test.rb
stripe-1.19.0 test/stripe/application_fee_test.rb
stripe-1.18.0 test/stripe/application_fee_test.rb
stripe-1.17.3 test/stripe/application_fee_test.rb
stripe-1.17.2 test/stripe/application_fee_test.rb
stripe-1.17.1 test/stripe/application_fee_test.rb
stripe-1.16.1 test/stripe/application_fee_test.rb
stripe-1.16.0 test/stripe/application_fee_test.rb
stripe-1.15.0 test/stripe/application_fee_test.rb
stripe-1.14.0 test/stripe/application_fee_test.rb
stripe-1.13.0 test/stripe/application_fee_test.rb
stripe-1.12.0 test/stripe/application_fee_test.rb
stripe-1.11.0 test/stripe/application_fee_test.rb
stripe-1.10.1 test/stripe/application_fee_test.rb