Sha256: 15f05f919fbffa9f05be597ca0e563b7353a3c8dacb27acc0cdd8777dc5bdda8

Contents?: true

Size: 617 Bytes

Versions: 13

Compression:

Stored size: 617 Bytes

Contents

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

module Stripe
  class CouponTest < Test::Unit::TestCase
    should "create should return a new coupon" do
      @mock.expects(:post).once.returns(test_response(test_coupon))
      c = Stripe::Coupon.create
      assert_equal "co_test_coupon", c.id
    end

    should "coupons should be updateable" do
      @mock.expects(:get).once.returns(test_response(test_coupon))
      @mock.expects(:post).once.returns(test_response(test_coupon))
      c = Stripe::Coupon.new("test_coupon")
      c.refresh
      c.metadata['foo'] = 'bar'
      c.save
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
stripe-1.22.0 test/stripe/coupon_test.rb
stripe-1.21.0 test/stripe/coupon_test.rb
stripe-1.20.4 test/stripe/coupon_test.rb
stripe-1.20.3 test/stripe/coupon_test.rb
stripe-1.20.2 test/stripe/coupon_test.rb
stripe-1.20.1 test/stripe/coupon_test.rb
stripe-1.20.0 test/stripe/coupon_test.rb
stripe-1.19.0 test/stripe/coupon_test.rb
stripe-1.18.0 test/stripe/coupon_test.rb
stripe-1.17.3 test/stripe/coupon_test.rb
stripe-1.17.2 test/stripe/coupon_test.rb
stripe-1.17.1 test/stripe/coupon_test.rb
stripe-1.16.1 test/stripe/coupon_test.rb