mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Rename VariantOverrides class to VariantOverridesIndexed
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class VariantOverrides
|
||||
class VariantOverridesIndexed
|
||||
def initialize(line_items:, distributor_ids:)
|
||||
@line_items = line_items
|
||||
@distributor_ids = distributor_ids
|
||||
@@ -101,7 +101,7 @@ module OpenFoodNetwork
|
||||
|
||||
def report_variant_overrides
|
||||
@report_variant_overrides ||=
|
||||
VariantOverrides.new(
|
||||
VariantOverridesIndexed.new(
|
||||
line_items: order_permissions.visible_line_items,
|
||||
distributor_ids: report_line_items.orders.result.select('DISTINCT distributor_id'),
|
||||
).indexed
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe VariantOverrides do
|
||||
describe VariantOverridesIndexed do
|
||||
subject(:variant_overrides) do
|
||||
described_class.new(
|
||||
line_items: order.line_items,
|
||||
Reference in New Issue
Block a user