Sha256: bb2bb326b4df82be6a8045cb1a9468fa4518ebbeb1f8db87e396a86a5ff3c697
Contents?: true
Size: 1.02 KB
Versions: 25
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' # Attributes describe 'Factories' do let(:factories) { [:user, :customer, :subscription, :address, :product, :cart, :order_item, :order, :purchased_order, :declined_order, :cart_with_subscription, :order_with_subscription] } before { StripeMock.start } after { StripeMock.stop } it 'should have all valid factories' do factories.each do |factory| obj = FactoryGirl.create(factory) puts "Invalid factory #{factory}: #{obj.errors.inspect}" unless obj.valid? obj.valid?.should eq true end end it 'should have created an Order with a billing_address and shipping_address' do order = FactoryGirl.create(:order) order.billing_address.present?.should eq true order.shipping_address.present?.should eq true order.billing_address.valid?.should eq true order.shipping_address.valid?.should eq true order.billing_address.full_name.present?.should eq true order.shipping_address.full_name.present?.should eq true order.save.should eq true end end
Version data entries
25 entries across 25 versions & 1 rubygems