Sha256: c2aecee8a8fc71117523bf77da40110e8b93f26ccac78a8cd4ee6ff044f9b437

Contents?: true

Size: 457 Bytes

Versions: 4

Compression:

Stored size: 457 Bytes

Contents

module Factories
  def self.bootstrap
    customer = Customer.create(
      display_name: 'Michael',
      email: 'michael@example.com'
    )

    Order.create(customer_id: customer.id, number: new_num, total_price_cents: 1399)
    Order.create(customer_id: customer.id, number: new_num, total_price_cents: 1399)
    Order.create(customer_id: customer.id, number: new_num, total_price_cents: 1399)
  end

  def self.new_num
    Order.count + 1000
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
graphql-cache-0.6.0 test_schema/factories.rb
graphql-cache-0.5.0 test_schema/factories.rb
graphql-cache-0.4.0 test_schema/factories.rb
graphql-cache-0.3.0 test_schema/factories.rb