Sha256: 6e9d7882aeba3112fa8dd1617c5f7f68ac8dee5a1ef14161606c39f5af7b3d28

Contents?: true

Size: 928 Bytes

Versions: 47

Compression:

Stored size: 928 Bytes

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 { |factory| FactoryGirl.create(factory).valid?.should eq true }
  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

47 entries across 47 versions & 1 rubygems

Version Path
effective_orders-1.8.1 spec/models/factories_spec.rb
effective_orders-1.8.0 spec/models/factories_spec.rb
effective_orders-1.7.5 spec/models/factories_spec.rb
effective_orders-1.7.4 spec/models/factories_spec.rb
effective_orders-1.7.3 spec/models/factories_spec.rb
effective_orders-1.7.2 spec/models/factories_spec.rb
effective_orders-1.7.1 spec/models/factories_spec.rb
effective_orders-1.7.0 spec/models/factories_spec.rb
effective_orders-1.6.6 spec/models/factories_spec.rb
effective_orders-1.6.5 spec/models/factories_spec.rb
effective_orders-1.6.4 spec/models/factories_spec.rb
effective_orders-1.6.3 spec/models/factories_spec.rb
effective_orders-1.6.1 spec/models/factories_spec.rb
effective_orders-1.6.0 spec/models/factories_spec.rb
effective_orders-1.5.9 spec/models/factories_spec.rb
effective_orders-1.5.8 spec/models/factories_spec.rb
effective_orders-1.5.7 spec/models/factories_spec.rb
effective_orders-1.5.5 spec/models/factories_spec.rb
effective_orders-1.5.4 spec/models/factories_spec.rb
effective_orders-1.5.3 spec/models/factories_spec.rb