mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix property filtering in shopping system spec
This commit is contained in:
@@ -67,7 +67,7 @@ angular.module('Darkswarm').controller "ProductsCtrl", ($scope, $sce, $filter, $
|
||||
page: page || $scope.page,
|
||||
per_page: $scope.per_page,
|
||||
'q[name_or_meta_keywords_or_variants_display_as_or_variants_display_name_or_variants_supplier_name_cont]': $scope.query,
|
||||
'q[with_properties][]': $scope.activeProperties,
|
||||
'q[with_variants_supplier_properties][]': $scope.activeProperties,
|
||||
'q[variants_primary_taxon_id_in_any][]': $scope.activeTaxons
|
||||
}
|
||||
|
||||
|
||||
@@ -25,11 +25,11 @@ RSpec.describe "As a consumer I want to view products" do
|
||||
orders_close_at: 2.days.from_now)
|
||||
}
|
||||
let(:product) {
|
||||
create(:simple_product, supplier:, primary_taxon: taxon, properties: [property],
|
||||
name: "Beans")
|
||||
create(:simple_product, supplier_id: supplier.id, primary_taxon: taxon,
|
||||
properties: [property], name: "Beans")
|
||||
}
|
||||
let(:product2) {
|
||||
create(:product, supplier:, primary_taxon: taxon2, properties: [property2],
|
||||
create(:product, supplier_id: supplier.id, primary_taxon: taxon2, properties: [property2],
|
||||
name: "Chickpeas")
|
||||
}
|
||||
let(:variant) { product.variants.first }
|
||||
|
||||
@@ -392,7 +392,6 @@ RSpec.describe "As a consumer I want to shop with a distributor" do
|
||||
create(:simple_product, supplier_id: supplier.id, inherits_properties: false)
|
||||
}
|
||||
|
||||
# TODO properties
|
||||
before do
|
||||
add_variant_to_order_cycle(exchange, product3.variants.first)
|
||||
property = create(:property, presentation: 'certified')
|
||||
|
||||
Reference in New Issue
Block a user