Sha256: 89e828511c54365259c8db8966026eec0702130610603b230959499e519b8193
Contents?: true
Size: 835 Bytes
Versions: 5
Compression:
Stored size: 835 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe Chargify::Customer do context 'find by reference' do before do @reference = 'ref0123' @existing_customer = Factory(:customer, :reference => @reference, :id => FactoryGirl.generate(:customer_id)) FakeWeb.register_uri(:get, "#{test_domain}/customers/lookup.xml?reference=#{@existing_customer.reference}", :body => @existing_customer.attributes.to_xml) end it 'finds the correct customer by reference' do customer = Chargify::Customer.find_by_reference(@reference) customer.should eql(@existing_customer) end it 'is an instance of Chargify::Customer' do customer = Chargify::Customer.find_by_reference(@reference) customer.should be_instance_of(Chargify::Customer) end end end
Version data entries
5 entries across 5 versions & 1 rubygems