mirror of
https://github.com/penpot/penpot.git
synced 2025-05-29 14:36:11 +02:00
🎉 Add binfile import/export internal functionality
This commit is contained in:
parent
46d075611d
commit
b944d977bb
20 changed files with 1238 additions and 181 deletions
|
@ -28,11 +28,11 @@
|
|||
"Given storage map, returns a storage configured with the appropriate
|
||||
backend for assets."
|
||||
([storage]
|
||||
(assoc storage :backend :tmp))
|
||||
(assoc storage :backend :assets-fs))
|
||||
([storage conn]
|
||||
(-> storage
|
||||
(assoc :conn conn)
|
||||
(assoc :backend :tmp))))
|
||||
(assoc :backend :assets-fs))))
|
||||
|
||||
(t/deftest put-and-retrieve-object
|
||||
(let [storage (-> (:app.storage/storage th/*system*)
|
||||
|
@ -44,7 +44,7 @@
|
|||
(t/is (sto/storage-object? object))
|
||||
(t/is (fs/path? @(sto/get-object-path storage object)))
|
||||
(t/is (nil? (:expired-at object)))
|
||||
(t/is (= :tmp (:backend object)))
|
||||
(t/is (= :assets-fs (:backend object)))
|
||||
(t/is (= "data" (:other (meta object))))
|
||||
(t/is (= "text/plain" (:content-type (meta object))))
|
||||
(t/is (= "content" (slurp @(sto/get-object-data storage object))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue