Sha256: 57f09032f2526bfdea54ecb62aa75e7c66c45c931d42929e0e5c41a3eebf328e
Contents?: true
Size: 901 Bytes
Versions: 1
Compression:
Stored size: 901 Bytes
Contents
require 'spec_helper' describe Chargify::Product do describe '.all' do it "should return a list of products" do stub_get "https://OU812:x@pengwynn.chargify.com/products.json", "products.json" products = Chargify::Product.all products.first.accounting_code.should == 'TSMO' end end describe '.find' do it "should return info for a product" do stub_get "https://OU812:x@pengwynn.chargify.com/products/8.json", "product.json" product = Chargify::Product.find(8) product.accounting_code.should == 'TSMO' end end describe '.find_by_handle' do it "should return info for a product by its handle" do stub_get "https://OU812:x@pengwynn.chargify.com/products/handle/tweetsaver.json", "product.json" product = Chargify::Product.find_by_handle('tweetsaver') product.accounting_code.should == 'TSMO' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jsmestad-chargify-0.3.0.pre5 | spec/unit/chargify/product_spec.rb |