12777: add specs

This commit is contained in:
Ahmed Ejaz
2024-09-03 01:22:22 +05:00
committed by Sigmund Petersen
parent 983addff0d
commit 009d033e4c

View File

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