Sha256: 031737123b47066fae47414d631eaf6c51e7a88afbb361b463eeb07c4d5da96c

Contents?: true

Size: 874 Bytes

Versions: 8

Compression:

Stored size: 874 Bytes

Contents

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

module Stripe
  class FileUploadTest < Test::Unit::TestCase
    should "create should return a new file" do
      @mock.expects(:post).once.returns(make_response(make_file))
      f = Stripe::FileUpload.create({
        :purpose => "dispute_evidence",
        :file => File.new(__FILE__),
      })
      assert_equal "fil_test_file", f.id
    end

    should "files should be retrievable" do
      @mock.expects(:get).once.returns(make_response(make_file))
      c = Stripe::FileUpload.new("fil_test_file")
      c.refresh
      assert_equal 1403047735, c.created
    end

    should "files should be listable" do
      @mock.expects(:get).once.returns(make_response(make_file_array))
      c = Stripe::FileUpload.all.data
      assert c.kind_of? Array
      assert c[0].kind_of? Stripe::FileUpload
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
stripe-1.28.0 test/stripe/file_upload_test.rb
stripe-1.27.2 test/stripe/file_upload_test.rb
stripe-1.27.1 test/stripe/file_upload_test.rb
stripe-1.27.0 test/stripe/file_upload_test.rb
stripe-1.26.0 test/stripe/file_upload_test.rb
stripe-1.25.0 test/stripe/file_upload_test.rb
stripe-1.24.0 test/stripe/file_upload_test.rb
stripe-1.23.0 test/stripe/file_upload_test.rb