Sha256: 786a96ee42536066f84aa89b14c86a824f52e8c221049e1754567e3029df47eb

Contents?: true

Size: 581 Bytes

Versions: 19

Compression:

Stored size: 581 Bytes

Contents

# -*- coding: utf-8 -*-
require File.expand_path('../../test_helper', __FILE__)

module Stripe
  class ApiOperationsTest < Test::Unit::TestCase
    class Updater < APIResource
      include Stripe::APIOperations::Save
    end

    should "the Update API operation should post the correct parameters to the resource URL" do
      @mock.expects(:post).once.
        with("#{Stripe.api_base}/v1/updaters/id", nil, 'foo=bar').
        returns(make_response({foo: 'bar'}))
      resource = Updater::update("id", {foo: "bar"})
      assert_equal('bar', resource.foo)
    end
  end
end


Version data entries

19 entries across 19 versions & 1 rubygems

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