mirror of
https://github.com/penpot/penpot.git
synced 2025-05-23 06:46:10 +02:00
✨ Move projects queries and mutations to commands
This commit is contained in:
parent
dc77c6b655
commit
dba7a9d424
14 changed files with 311 additions and 137 deletions
|
@ -9,6 +9,7 @@
|
|||
[app.common.uuid :as uuid]
|
||||
[app.db :as db]
|
||||
[app.http :as http]
|
||||
[app.rpc :as-alias rpc]
|
||||
[app.storage :as sto]
|
||||
[backend-tests.helpers :as th]
|
||||
[clojure.test :as t]
|
||||
|
@ -31,14 +32,14 @@
|
|||
io/read-as-bytes)
|
||||
|
||||
params {::th/type :create-font-variant
|
||||
:profile-id (:id prof)
|
||||
::rpc/profile-id (:id prof)
|
||||
:team-id team-id
|
||||
:font-id font-id
|
||||
:font-family "somefont"
|
||||
:font-weight 400
|
||||
:font-style "normal"
|
||||
:data {"font/ttf" ttfdata}}
|
||||
out (th/mutation! params)]
|
||||
out (th/command! params)]
|
||||
|
||||
(t/is (= 1 (:call-count @mock)))
|
||||
|
||||
|
@ -68,14 +69,14 @@
|
|||
io/read-as-bytes)
|
||||
|
||||
params {::th/type :create-font-variant
|
||||
:profile-id (:id prof)
|
||||
::rpc/profile-id (:id prof)
|
||||
:team-id team-id
|
||||
:font-id font-id
|
||||
:font-family "somefont"
|
||||
:font-weight 400
|
||||
:font-style "normal"
|
||||
:data {"font/woff" data}}
|
||||
out (th/mutation! params)]
|
||||
out (th/command! params)]
|
||||
|
||||
;; (th/print-result! out)
|
||||
(t/is (nil? (:error out)))
|
||||
|
@ -91,8 +92,3 @@
|
|||
:font-family
|
||||
:font-weight
|
||||
:font-style))))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue