refactor(charts): unify on Chart.js, remove Chartist #10

Closed
notid wants to merge 139 commits from integreat-unify-charts into master
Showing only changes of commit 69c75ba124 - Show all commits

View File

@@ -183,6 +183,31 @@
(is (= 200 (:status response)))
(is (string? (apply str (:body response))))))))
(deftest execute-dialog-route-works
(testing "Execute dialog route should return execution dialog"
;; Given: Create a transaction rule
(let [tempids (setup-test-data [{:db/id "rule-to-execute"
:transaction-rule/description "Rule to Execute"
:transaction-rule/note "Execute me"}])
rule-id (get tempids "rule-to-execute")
request {:identity (admin-token)
:route-params {:db/id rule-id}}]
;; When: Call execute-dialog route
(let [response ((get sut/key->handler :auto-ap.routes.admin.transaction-rules/execute-dialog) request)]
;; Then: Returns HTML dialog
(is (= 200 (:status response)))
(is (string? (apply str (:body response))))))))
(deftest new-dialog-route-returns-empty-form
(testing "New dialog route should return empty form for new rule"
;; Given: Admin request
(let [request {:identity (admin-token)}]
;; When: Call new-dialog route
(let [response ((get sut/key->handler :auto-ap.routes.admin.transaction-rules/new-dialog) request)]
;; Then: Returns HTML form
(is (= 200 (:status response)))
(is (string? (apply str (:body response))))))))
;; ============================================
;; Phase 5: CRUD and Security Tests
;; ============================================