mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 00:28:28 +02:00
Improve history handling on backend.
This commit is contained in:
parent
0cd3442d86
commit
691c359985
3 changed files with 51 additions and 4 deletions
|
@ -160,7 +160,7 @@
|
|||
;; Check inserted history
|
||||
(let [sqlv ["SELECT * FROM pages_history WHERE page=?" (:id data)]
|
||||
result (sc/fetch conn sqlv)]
|
||||
(t/is (= (count result) 100)))
|
||||
(t/is (= (count result) 101)))
|
||||
|
||||
;; Check retrieve all items
|
||||
(with-server {:handler (uft/routes)}
|
||||
|
@ -169,7 +169,7 @@
|
|||
;; (println "RESPONSE:" status result)
|
||||
(t/is (= (count result) 10))
|
||||
(t/is (= 200 status))
|
||||
(t/is (= 99 (:version (first result))))
|
||||
(t/is (= 100 (:version (first result))))
|
||||
|
||||
(let [params {:query {:since (:version (last result))
|
||||
:max 20}}
|
||||
|
@ -177,7 +177,7 @@
|
|||
;; (println "RESPONSE:" status result)
|
||||
(t/is (= (count result) 20))
|
||||
(t/is (= 200 status))
|
||||
(t/is (= 89 (:version (first result))))))
|
||||
(t/is (= 90 (:version (first result))))))
|
||||
))))
|
||||
|
||||
(t/deftest test-http-page-history-update
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue