From 22e96764ec83107fc9ef9624d2ff8d1edf978a6d Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 23 Nov 2023 08:39:20 +1100 Subject: [PATCH] Simplify spec --- spec/system/admin/orders_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/system/admin/orders_spec.rb b/spec/system/admin/orders_spec.rb index 5dcb793f45..bd313ee5de 100644 --- a/spec/system/admin/orders_spec.rb +++ b/spec/system/admin/orders_spec.rb @@ -579,7 +579,8 @@ describe ' invoice_file_number = pdf_href[0][45..59] invoice_path = "tmp/invoices/#{invoice_file_number}.pdf" reader = PDF::Reader.new(invoice_path) - invoice_content = reader.pages.map(&:text) + + reader.pages.map(&:text) end it "bulk prints invoices in pdf format" do @@ -606,7 +607,7 @@ describe ' within ".modal-content" do expect(page).to have_link(class: "button", text: "VIEW FILE", href: /invoices/) - invoice_content = extract_pdf_content # extracts content do variable invoice_content + invoice_content = extract_pdf_content expect(invoice_content).to have_content("TAX INVOICE", count: 2) expect(invoice_content).to have_content("TAX INVOICE: #{order4.number}")