Module: Workarea::Factories::Insights

Defined in:
lib/workarea/testing/factories/insights.rb

Instance Method Summary collapse

Instance Method Details

#create_cold_products(overrides = {}) ⇒ Object



11
12
13
14
# File 'lib/workarea/testing/factories/insights.rb', line 11

def create_cold_products(overrides = {})
  attributes = factory_defaults(:cold_products).merge(overrides)
  Workarea::Insights::ColdProducts.create!(attributes)
end

#create_hot_products(overrides = {}) ⇒ Object



6
7
8
9
# File 'lib/workarea/testing/factories/insights.rb', line 6

def create_hot_products(overrides = {})
  attributes = factory_defaults(:hot_products).merge(overrides)
  Workarea::Insights::HotProducts.create!(attributes)
end

#create_top_discounts(overrides = {}) ⇒ Object



26
27
28
29
# File 'lib/workarea/testing/factories/insights.rb', line 26

def create_top_discounts(overrides = {})
  attributes = factory_defaults(:top_discounts).merge(overrides)
  Workarea::Insights::TopDiscounts.create!(attributes)
end

#create_top_products(overrides = {}) ⇒ Object



16
17
18
19
# File 'lib/workarea/testing/factories/insights.rb', line 16

def create_top_products(overrides = {})
  attributes = factory_defaults(:top_products).merge(overrides)
  Workarea::Insights::TopProducts.create!(attributes)
end


21
22
23
24
# File 'lib/workarea/testing/factories/insights.rb', line 21

def create_trending_products(overrides = {})
  attributes = factory_defaults(:trending_products).merge(overrides)
  Workarea::Insights::TrendingProducts.create!(attributes)
end