mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
Fix tag_rules ForbiddenAttributes errors
Example error:
Tag Rules creating allows creation of rules of each type
Failure/Error: expect(tag_rule.preferred_shipping_method_tags).to eq "volunteers-only"
expected: "volunteers-only"
got: ""
(compared using ==)
# ./spec/features/admin/tag_rules_spec.rb:81:in `block (3 levels) in <top (required)>'
This commit is contained in:
@@ -4,7 +4,11 @@ module PermittedAttributes
|
||||
class TagRules
|
||||
def self.attributes
|
||||
[
|
||||
:id, :type, :preferred_customer_tags, :calculator_type,
|
||||
:id, :type, :priority, :is_default, :preferred_customer_tags, :preferred_exchange_tags,
|
||||
:preferred_matched_order_cycles_visibility, :preferred_shipping_method_tags,
|
||||
:preferred_matched_shipping_methods_visibility, :preferred_payment_method_tags,
|
||||
:preferred_matched_payment_methods_visibility, :preferred_variant_tags,
|
||||
:preferred_matched_variants_visibility, :calculator_type,
|
||||
{ calculator_attributes: [:id, :preferred_flat_percent] }
|
||||
]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user