test(invoice): add integration tests for invoice behaviors
- Fix schema ordering: move :journal-entry-line/running-balance to schema.edn - Add invoice_behaviors_test.clj covering: - Permission gates (26.5, 26.6, 26.8) - Lock date blocking (27.1, 27.3) - New invoice validation (8.1, 8.5) - Edit invoice (11.1, 11.3) - Bulk edit (15.4) - Single/bulk void (16.3, 16.4, 17.1) - Unvoid restoring from history (18.1) - Undo autopay (19.1) - Invoice list filtering (2.6, 2.8, 2.10, 2.14) - Invoice list sorting (3.5, 3.7, 3.10) - Invoice list pagination (4.1, 4.3) - Legacy route redirects (28.1) - Mock Solr in wrap-setup fixture to prevent Connection refused - Fix setup-test-data to merge user-provided entities with defaults - Fix InMemSolrClient.index_documents to handle entity IDs - Fix ezcater_xls test to use dynamic entity IDs - Update invoice.md behavior checklist with completed items
This commit is contained in:
@@ -23,37 +23,37 @@
|
||||
(with-open [s (io/input-stream (io/resource "sample-ezcater.xlsx"))]
|
||||
(is (seq (sut/stream->sales-orders s))))
|
||||
(with-open [s (io/input-stream (io/resource "sample-ezcater.xlsx"))]
|
||||
(is (= #:sales-order
|
||||
{:vendor :vendor/ccp-ezcater
|
||||
:service-charge -95.9
|
||||
:date #inst "2023-04-03T18:30:00"
|
||||
:reference-link "ZA2-320"
|
||||
:charges
|
||||
[#:charge{:type-name "CARD"
|
||||
:date #inst "2023-04-03T18:30:00"
|
||||
:client test-client
|
||||
:location "DT"
|
||||
:external-id
|
||||
"ezcater/charge/17592186045501-DT-ZA2-320-0"
|
||||
:processor :ccp-processor/ezcater
|
||||
:total 516.12
|
||||
:tip 0.0}]
|
||||
:client test-client
|
||||
:tip 0.0
|
||||
:tax 37.12
|
||||
:external-id "ezcater/order/17592186045501-DT-ZA2-320"
|
||||
:total 516.12
|
||||
:line-items
|
||||
[#:order-line-item{:external-id
|
||||
"ezcater/order/17592186045501-DT-ZA2-320-0"
|
||||
:item-name "EZCater Catering"
|
||||
:category "EZCater Catering"
|
||||
:discount 0.0
|
||||
:tax 37.12
|
||||
:total 516.12}]
|
||||
:discount 0.0
|
||||
:location "DT"
|
||||
:returns 0.0}
|
||||
(last (first (filter (comp #{:order} first)
|
||||
(sut/stream->sales-orders s)))))))))))
|
||||
(is (= #:sales-order
|
||||
{:vendor :vendor/ccp-ezcater
|
||||
:service-charge -95.9
|
||||
:date #inst "2023-04-03T18:30:00"
|
||||
:reference-link "ZA2-320"
|
||||
:charges
|
||||
[#:charge{:type-name "CARD"
|
||||
:date #inst "2023-04-03T18:30:00"
|
||||
:client test-client
|
||||
:location "DT"
|
||||
:external-id
|
||||
(str "ezcater/charge/" test-client "-DT-ZA2-320-0")
|
||||
:processor :ccp-processor/ezcater
|
||||
:total 516.12
|
||||
:tip 0.0}]
|
||||
:client test-client
|
||||
:tip 0.0
|
||||
:tax 37.12
|
||||
:external-id (str "ezcater/order/" test-client "-DT-ZA2-320")
|
||||
:total 516.12
|
||||
:line-items
|
||||
[#:order-line-item{:external-id
|
||||
(str "ezcater/order/" test-client "-DT-ZA2-320-0")
|
||||
:item-name "EZCater Catering"
|
||||
:category "EZCater Catering"
|
||||
:discount 0.0
|
||||
:tax 37.12
|
||||
:total 516.12}]
|
||||
:discount 0.0
|
||||
:location "DT"
|
||||
:returns 0.0}
|
||||
(last (first (filter (comp #{:order} first)
|
||||
(sut/stream->sales-orders s)))))))))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user