Sha256: 0b48a5003f4c97fb7bf273f4a6c9c358cb196c289a9ce64b2426e76e15bbb3a1

Contents?: true

Size: 842 Bytes

Versions: 37

Compression:

Stored size: 842 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(make_response(make_application_fee_array))
      fees = Stripe::ApplicationFee.list
      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
      fee = Stripe::ApplicationFee.construct_from(make_application_fee)

      @mock.expects(:post).once.
        with("#{Stripe.api_base}/v1/application_fees/#{fee.id}/refunds", nil, '').
        returns(make_response(make_application_fee_refund))

      refund = fee.refunds.create
      assert refund.is_a?(Stripe::ApplicationFeeRefund)
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
stripe-1.58.0 test/stripe/application_fee_test.rb
stripe-1.57.1 test/stripe/application_fee_test.rb
stripe-1.57.0 test/stripe/application_fee_test.rb
stripe-1.56.2 test/stripe/application_fee_test.rb
stripe-1.56.1 test/stripe/application_fee_test.rb
stripe-1.56.0 test/stripe/application_fee_test.rb
stripe-1.55.1 test/stripe/application_fee_test.rb
stripe-1.55.0 test/stripe/application_fee_test.rb
stripe-1.54.0 test/stripe/application_fee_test.rb
stripe-1.53.0 test/stripe/application_fee_test.rb
stripe-1.52.0 test/stripe/application_fee_test.rb
stripe-1.51.1 test/stripe/application_fee_test.rb
stripe-1.51.0 test/stripe/application_fee_test.rb
stripe-1.50.1 test/stripe/application_fee_test.rb
stripe-1.50.0 test/stripe/application_fee_test.rb
stripe-1.49.0 test/stripe/application_fee_test.rb
stripe-1.48.0 test/stripe/application_fee_test.rb
stripe-1.47.0 test/stripe/application_fee_test.rb
stripe-1.46.0 test/stripe/application_fee_test.rb
stripe-1.45.0 test/stripe/application_fee_test.rb