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:
Matt-Yorkley
2020-11-07 20:07:37 +00:00
parent ea5c7c5990
commit 4394d2fe43

View File

@@ -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