adding transaction rules.
This commit is contained in:
15
test/clj/auto_ap/graphql.clj
Normal file
15
test/clj/auto_ap/graphql.clj
Normal file
@@ -0,0 +1,15 @@
|
||||
(ns test.auto-ap.graphql
|
||||
(:require [auto-ap.graphql :as sut]
|
||||
[clojure.test :as t :refer [deftest is testing]]))
|
||||
|
||||
(deftest query
|
||||
(testing "it should find rules"
|
||||
(let [result (:transaction-rule-page (:data (sut/query nil "{ transaction_rule_page(client_id: null) { count, start, transaction_rules { id } }}")))]
|
||||
(is (int? (:count result)))
|
||||
(is (int? (:start result)))
|
||||
(is (seqable? (:transaction-rules result)))))
|
||||
|
||||
(testing "it should find ledger entries"
|
||||
(is (= {:data {:ledger-page {:count 100}}}
|
||||
(sut/query nil "{ ledger_page(client_id: null) { count }}")))))
|
||||
|
||||
Reference in New Issue
Block a user