From 7d27f46d68f907be603b00fa4f8b0522c454aa50 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 5 Dec 2024 16:31:37 +1100 Subject: [PATCH] Simplify negated expectation --- spec/system/admin/orders/bulk_actions_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/system/admin/orders/bulk_actions_spec.rb b/spec/system/admin/orders/bulk_actions_spec.rb index 1d1e861d11..9bf49bd932 100644 --- a/spec/system/admin/orders/bulk_actions_spec.rb +++ b/spec/system/admin/orders/bulk_actions_spec.rb @@ -447,6 +447,7 @@ RSpec.describe ' end end end + it "can bulk cancel 2 orders" do page.find("#listing_orders tbody tr:nth-child(1) input[name='bulk_ids[]']").click page.find("#listing_orders tbody tr:nth-child(2) input[name='bulk_ids[]']").click @@ -463,7 +464,7 @@ RSpec.describe ' uncheck "Send a cancellation email to the customer" expect { find_button("Cancel").click # Cancels the cancel action - }.not_to enqueue_job(ActionMailer::MailDeliveryJob).exactly(:twice) + }.not_to enqueue_mail end page.find("span.icon-reorder", text: "Actions").click @@ -474,7 +475,7 @@ RSpec.describe ' within ".reveal-modal" do expect { find_button("Confirm").click # Confirms the cancel action - }.not_to enqueue_job(ActionMailer::MailDeliveryJob).exactly(:twice) + }.not_to enqueue_mail end expect(page).to have_content("CANCELLED", count: 2)