mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 00:10:11 -05:00
Merge pull request #4458 from penpot/niwinz-staging-bugfix-2
✨ Minor enhancements
This commit is contained in:
commit
88f46f2ab2
3 changed files with 17 additions and 5 deletions
|
@ -46,6 +46,10 @@
|
|||
(let [email (str/lower email)
|
||||
email (if (str/starts-with? email "mailto:")
|
||||
(subs email 7)
|
||||
email)
|
||||
email (if (or (str/starts-with? email "<")
|
||||
(str/ends-with? email ">"))
|
||||
(str/trim email "<>")
|
||||
email)]
|
||||
email))
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
|
||||
:else
|
||||
(try
|
||||
(l/trc :hint "start"
|
||||
(l/dbg :hint "start"
|
||||
:name (:name task)
|
||||
:task-id (str task-id)
|
||||
:queue queue
|
||||
|
@ -149,7 +149,7 @@
|
|||
result (handle-task task)
|
||||
elapsed (dt/format-duration (tpoint))]
|
||||
|
||||
(l/trc :hint "end"
|
||||
(l/dbg :hint "end"
|
||||
:name (:name task)
|
||||
:task-id (str task-id)
|
||||
:queue queue
|
||||
|
@ -228,9 +228,9 @@
|
|||
(recur))))
|
||||
|
||||
(catch InterruptedException _
|
||||
(l/debug :hint "interrupted"
|
||||
:id id
|
||||
:queue queue))
|
||||
(l/dbg :hint "interrupted"
|
||||
:id id
|
||||
:queue queue))
|
||||
(catch Throwable cause
|
||||
(l/err :hint "unexpected exception"
|
||||
:id id
|
||||
|
|
|
@ -27,6 +27,14 @@
|
|||
(t/use-fixtures :once th/state-init)
|
||||
(t/use-fixtures :each th/database-reset)
|
||||
|
||||
|
||||
(t/deftest clean-email
|
||||
(t/is "foo@example.com" (profile/clean-email "mailto:foo@example.com"))
|
||||
(t/is "foo@example.com" (profile/clean-email "mailto:<foo@example.com>"))
|
||||
(t/is "foo@example.com" (profile/clean-email "<foo@example.com>"))
|
||||
(t/is "foo@example.com" (profile/clean-email "foo@example.com>"))
|
||||
(t/is "foo@example.com" (profile/clean-email "<foo@example.com")))
|
||||
|
||||
;; Test with wrong credentials
|
||||
(t/deftest profile-login-failed-1
|
||||
(let [profile (th/create-profile* 1)
|
||||
|
|
Loading…
Reference in a new issue