This commit is contained in:
Feruz Oripov
2024-03-16 19:14:18 +05:00
parent 9d919938f3
commit 778ed46d50
4 changed files with 7 additions and 7 deletions

View File

@@ -18,10 +18,10 @@ describe OrderCycleOpenedJob do
.to receive(:create_webhook_job).with(oc_opened_now, 'order_cycle.opened')
expect(OrderCycles::WebhookService)
.to_not receive(:create_webhook_job).with(oc_opened_before, 'order_cycle.opened')
.not_to receive(:create_webhook_job).with(oc_opened_before, 'order_cycle.opened')
expect(OrderCycles::WebhookService)
.to_not receive(:create_webhook_job).with(oc_opening_soon, 'order_cycle.opened')
.not_to receive(:create_webhook_job).with(oc_opening_soon, 'order_cycle.opened')
OrderCycleOpenedJob.perform_now
end

View File

@@ -205,8 +205,8 @@ describe ProxyOrder, type: :model do
end
it "returns the existing order" do
expect(Orders::FactoryService).to_not receive(:new)
expect(proxy_order).to_not receive(:save!)
expect(Orders::FactoryService).not_to receive(:new)
expect(proxy_order).not_to receive(:save!)
expect(proxy_order.initialise_order!).to eq existing_order
end
end

View File

@@ -22,7 +22,7 @@ describe OrderCycles::WebhookService do
coordinator_user.webhook_endpoints.create!(url: "http://coordinator_user_url")
expect{ OrderCycles::WebhookService.create_webhook_job(order_cycle, "order_cycle.opened") }
.to_not enqueue_job(WebhookDeliveryJob).with("http://coordinator_user_url", any_args)
.not_to enqueue_job(WebhookDeliveryJob).with("http://coordinator_user_url", any_args)
end
context "coordinator owner has endpoint configured" do
@@ -134,7 +134,7 @@ describe OrderCycles::WebhookService do
expect{
OrderCycles::WebhookService.create_webhook_job(order_cycle, "order_cycle.opened")
}
.to_not enqueue_job(WebhookDeliveryJob).with("http://supplier_owner_url", any_args)
.not_to enqueue_job(WebhookDeliveryJob).with("http://supplier_owner_url", any_args)
end
end
end

View File

@@ -8,7 +8,7 @@ describe Orders::CheckoutRestartService do
describe "#call" do
context "when the order is already in the 'cart' state" do
it "does nothing" do
expect(order).to_not receive(:restart_checkout!)
expect(order).not_to receive(:restart_checkout!)
Orders::CheckoutRestartService.new(order).call
end
end