Matt-Yorkley
45beefc533
Keep the order of passed argument
...
Do not retrieve the orders list sorted by completed_at but by the order_ids array itself
Add BulkInvoiceJob spec and cover sorting behaviour
2021-12-16 09:33:38 +01:00
Luis Ramos
23627c5453
Run rubocop -a (safe corrections) removing all exceptions so all possible fixes are applied
...
9290 issues fixed
2021-06-17 22:19:26 +01:00
Matt-Yorkley
ab65b01fcf
Rename payments helper
2021-05-03 14:17:54 +01:00
Luis Ramos
ae7e1677f7
Add needed helper to BulkInvoiceService spec
2021-04-13 16:54:32 -07:00
Matt-Yorkley
a5929b489a
Ensure order object has line items in bulk_invoice_service
2021-03-04 14:27:02 +00:00
Luis Ramos
5b00868c6f
Allow mutable strings in some specs
2020-12-03 06:38:24 -08:00
Luis Ramos
2b8f0abe49
Try some mass auto-correct adding frozen-string-literal to all specs
2020-12-03 06:38:24 -08:00
Matt-Yorkley
98c99de835
Use ActiveJob::Testhelper where needed
2020-11-27 14:00:29 +00:00
Matt-Yorkley
e1c1574931
Refactor BulkInvoiceService to use ActiveJob
...
Removes use of #handle_asynchronously, which we need to do elsewhere. Fixes:
BulkInvoiceService#start_pdf_job starts a background process to create a pdf with multiple invoices
Failure/Error:
expect do
service.start_pdf_job [1, 2]
end.to enqueue_job Delayed::PerformableMethod
expected to enqueue exactly 1 jobs, but enqueued 0
# ./spec/services/bulk_invoice_service_spec.rb:8:in `block (3 levels) in <top (required)>'
2020-11-27 14:00:29 +00:00
Maikel Linke
7d53b12baf
Preserve sorting by completion date
2020-06-10 10:19:15 +10:00
Maikel Linke
680ee3dc86
Check the bulk invoice rendering order
...
As it turns out, our performance optimisation with `find_each` overrides
or custom sorting.
2020-06-10 10:05:47 +10:00
François Turbelin
795106aaa2
Use real orders inside spec to extend coverage
2020-06-09 10:11:11 +02:00
François Turbelin
b2b988b063
Apply new order directly inside service
2020-05-24 14:41:40 +02:00
Maikel Linke
612ea4c781
Simplify spec of invoice creation
2019-02-13 17:55:48 +11:00
Maikel Linke
7c5b430a37
Test execution of BulkInvoiceService#start_pdf_job
...
The spec just tested if a job was enqueued, but not if the job can
actually be executed. Unfortunately, this test is quite slow.
2019-02-06 11:26:22 +11:00
Matt-Yorkley
4f9f8adcd6
Add Service and remove Job
2019-01-10 09:57:06 +00:00