Files
openfoodnetwork/spec/support/test_summarizer.rb
2021-06-21 10:30:12 +02:00

17 lines
433 B
Ruby

# frozen_string_literal: true
# A fake summarizer that implements a more handy public API to reach out to its internal state,
# which greatly simplifyies integration testing.
class TestSummarizer < OrderManagement::Subscriptions::Summarizer
attr_reader :recorded_issues
def initialize
@recorded_issues = {}
super
end
def record_issue(_type, order, message = nil)
@recorded_issues[order.id] = message
end
end