Sha256: 67c689827700cc21678083ef3560cdf131c98898c52390744c8836290da13140
Contents?: true
Size: 714 Bytes
Versions: 1
Compression:
Stored size: 714 Bytes
Contents
require 'spec_helper' describe Chargify::Product do context '.find_by_handle' do let(:existing_product) { Chargify::Product.create(:id => 2, :handle => 'green-money') } before(:each) do FakeWeb.register_uri(:get, "#{test_domain}/products/lookup.xml?handle=#{existing_product.handle}", :body => existing_product.attributes.to_xml) end it 'finds the correct product by handle' do product = Chargify::Product.find_by_handle('green-money') product.should == existing_product end it 'is an instance of Chargify::Product' do product = Chargify::Product.find_by_handle('green-money') product.should be_instance_of(Chargify::Product) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
chargify_api_ares-0.5.0 | spec/resources/product_spec.rb |