Sha256: 48cb83c67faf832cb99a6eccfd003e0f6973857305582d13d62eb9a1d7de4c00
Contents?: true
Size: 773 Bytes
Versions: 13
Compression:
Stored size: 773 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe Chargify::Product do context 'find by handle' do before do @handle = 'handle1' @existing_product = Factory(:product, :handle => @handle, :id => Factory.next(:product_id)) 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(@handle) product.should eql(@existing_product) end it 'is an instance of Chargify::Product' do product = Chargify::Product.find_by_handle(@handle) product.should be_instance_of(Chargify::Product) end end end
Version data entries
13 entries across 13 versions & 4 rubygems