payroll-import/test/import_test.clj
2024-02-22 14:21:47 +11:00

22 lines
1,012 B
Clojure

;; Copyright 2024 Ben Sturmfels
;; License: GPLv3-or-later
(ns import-test
(:require [import]
[clojure.java.io]
[clojure.test :as t]))
(t/deftest sample-import
(let [grouped-data (import/read-grouped-csv
(clojure.java.io/resource
"example-paychex-pay-item-details.csv"))
imported (concat (import/payroll "2023-12-29" "December 2023" "rt:19462/674660" grouped-data)
(import/individual-taxes "2023-12-29" "December 2023" "rt:19462/674660" "rt:19403/675431" grouped-data)
(import/employer-taxes "2023-12-29" "December 2023" "rt:19462/674660" grouped-data)
(import/payroll-fees "2023-12-29" "December 2023" "rt:19459/675387" "rt:19459/674887" 206.50M grouped-data)
(import/retirement "2024-01-02" "December 2023" "rt:19403/676724" "rt:19403/675431" grouped-data))]
(t/is (= (count imported) 6))))
(comment
(t/run-all-tests)
)