Sha256: 692bb3ac062555eecb91f126d255b58c9e8fbd786f1a983f710f9a6c91a99e79

Contents?: true

Size: 747 Bytes

Versions: 23

Compression:

Stored size: 747 Bytes

Contents

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

module Stripe
  class OrderReturnTest < Test::Unit::TestCase
    should "returns should be listable" do
      @mock.expects(:get).once.returns(make_response(make_order_return_array))
      returns = Stripe::OrderReturn.list
      assert returns.data.kind_of?(Array)
      returns.each do |ret|
        assert ret.kind_of?(Stripe::OrderReturn)
      end
    end

    should "returns should not be deletable" do
      p = Stripe::OrderReturn.new("test_order")
      assert_raises(NoMethodError) { p.delete }
    end

    should "returns should be immutable" do
      p = Stripe::OrderReturn.new("test_order")
      p.items = []
      assert_raises(NoMethodError) { p.save }
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

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