mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-05 00:02:50 -04:00
25 lines
640 B
Ruby
25 lines
640 B
Ruby
require File.expand_path('../../test_helper', __FILE__)
|
|
|
|
module Stripe
|
|
class SKUTest < Test::Unit::TestCase
|
|
should "SKUs should be listable" do
|
|
@mock.expects(:get).once.
|
|
returns(make_response(make_sku_array("test_product")))
|
|
skus = Stripe::SKU.all
|
|
assert skus.data.kind_of? Array
|
|
skus.each do |sku|
|
|
assert sku.kind_of?(Stripe::SKU)
|
|
end
|
|
end
|
|
|
|
should "SKUs should not be deletable" do
|
|
assert_raises NoMethodError do
|
|
@mock.expects(:get).once.returns(make_response(make_sku))
|
|
p = Stripe::SKU.retrieve("test_product")
|
|
p.delete
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|