mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-21 00:47:26 +00:00
Include option text in dropdown cart even if the variant and product have the same name
This commit is contained in:
@@ -49,6 +49,14 @@ describe 'Variants service', ->
|
||||
variant = {product_name: 'product_name', name_to_display: 'product_name'}
|
||||
expect(Variants.extendedVariantName(variant)).toEqual "product_name"
|
||||
|
||||
it "includes the options text even if variant name is same as product", ->
|
||||
variant =
|
||||
product_name: 'product_name'
|
||||
name_to_display: 'product_name'
|
||||
options_text: 'options_text'
|
||||
|
||||
expect(Variants.extendedVariantName(variant)).toEqual "product_name (options_text)"
|
||||
|
||||
describe "when the product name and the variant name differ", ->
|
||||
it "returns a combined name when there is no options text", ->
|
||||
variant =
|
||||
|
||||
Reference in New Issue
Block a user