0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-12 18:18:24 -05:00

📎 Fix affected backend tests.

This commit is contained in:
Andrey Antukh 2021-09-30 11:38:33 +02:00 committed by Alonso Torres
parent bee1db135f
commit 3e3faf6576
2 changed files with 2 additions and 17 deletions

View file

@ -53,21 +53,6 @@
(t/is (= (:id data) (:id result))) (t/is (= (:id data) (:id result)))
(t/is (= (:name data) (:name result)))))) (t/is (= (:name data) (:name result))))))
(t/testing "query files (deprecated)"
(let [data {::th/type :files
:project-id proj-id
:profile-id (:id prof)}
out (th/query! data)]
;; (th/print-result! out)
(t/is (nil? (:error out)))
(let [result (:result out)]
(t/is (= 1 (count result)))
(t/is (= file-id (get-in result [0 :id])))
(t/is (= "new name" (get-in result [0 :name])))
(t/is (= 1 (count (get-in result [0 :data :pages])))))))
(t/testing "query files" (t/testing "query files"
(let [data {::th/type :project-files (let [data {::th/type :project-files
:project-id proj-id :project-id proj-id
@ -120,7 +105,7 @@
(t/is (= (:type error-data) :not-found))))) (t/is (= (:type error-data) :not-found)))))
(t/testing "query list files after delete" (t/testing "query list files after delete"
(let [data {::th/type :files (let [data {::th/type :project-files
:project-id proj-id :project-id proj-id
:profile-id (:id prof)} :profile-id (:id prof)}
out (th/query! data)] out (th/query! data)]

View file

@ -136,7 +136,7 @@
(t/is (nil? (:error out)))) (t/is (nil? (:error out))))
;; query files after profile soft deletion ;; query files after profile soft deletion
(let [params {::th/type :files (let [params {::th/type :project-files
:project-id (:default-project-id prof) :project-id (:default-project-id prof)
:profile-id (:id prof)} :profile-id (:id prof)}
out (th/query! params)] out (th/query! params)]