mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
12777: add specs
This commit is contained in:
committed by
Sigmund Petersen
parent
983addff0d
commit
009d033e4c
@@ -300,6 +300,21 @@ RSpec.describe '
|
||||
expect(page).to have_content "Total (Excl. tax): $1,458.67"
|
||||
end
|
||||
end
|
||||
|
||||
context "Line item with variant having variant_unit as 'items'" do
|
||||
before do
|
||||
line_item1.variant.update_columns(variant_unit: "items", display_as: "1 bucket")
|
||||
login_as_admin
|
||||
visit spree.print_admin_order_path(order1, params: url_params)
|
||||
convert_pdf_to_page
|
||||
end
|
||||
|
||||
it 'should have correct display as value' do
|
||||
# first line item
|
||||
expect(page).to have_content Spree::Product.first.name.to_s
|
||||
expect(page).to have_content "(1 bucket)" # display as
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "added" do
|
||||
|
||||
Reference in New Issue
Block a user