From 4a434873bc1ed5a350d5f55f163cf08a0e4c2ae8 Mon Sep 17 00:00:00 2001 From: Abdellani Date: Fri, 7 Jun 2024 17:57:28 +0100 Subject: [PATCH] update tests --- spec/system/admin/orders/bulk_actions_spec.rb | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/spec/system/admin/orders/bulk_actions_spec.rb b/spec/system/admin/orders/bulk_actions_spec.rb index e93cfe4b5f..72ccc44d95 100644 --- a/spec/system/admin/orders/bulk_actions_spec.rb +++ b/spec/system/admin/orders/bulk_actions_spec.rb @@ -363,9 +363,22 @@ RSpec.describe ' } must have a valid ABN before invoices can be used." end end - it_behaves_like "should not print the invoice" - context "with legal invoices feature", feature: :invoices do + context "ABN is null" do it_behaves_like "should not print the invoice" + context "with legal invoices feature", feature: :invoices do + it_behaves_like "should not print the invoice" + end + end + context "ABN is empty string" do + before do + order4.distributor.update(abn: "123456789") + order5.distributor.update(abn: "") + end + + it_behaves_like "should not print the invoice" + context "with legal invoices feature", feature: :invoices do + it_behaves_like "should not print the invoice" + end end end end