workarea-commerce/workarea

ProductSearchTest#test_locale ignores localized_active_fields setting

Closed this issue · 1 comments

Describe the bug
A recently added test

product = create_product(active_translations: { 'en' => true, 'es' => false })

fails when Workarea.config.localized_active_fields is set to false because active field is not localized

From Workarea::Releasable

field :active, type: Boolean, default: true, localize: Workarea.config.localized_active_fields

To Reproduce

  1. Set Workarea.config.localized_active_fields = false
  2. Run test/queries/workarea/search/product_search_test.rb
  3. test_locale fails with Mongoid::Errors::UnknownAttribute exception

Expected behavior
Test should be skipped if localized_active_fields is set to false

Workarea Setup (please complete the following information):

  • Workarea Version: [v3.4.31]

Thanks for reporting, we'll get this in the patch release next week.