♻️ Unify flags parsing on backend.

This commit is contained in:
Andrey Antukh 2021-09-16 14:40:50 +02:00 committed by Andrés Moya
parent da1135c80f
commit 8a0bba3c7a
13 changed files with 140 additions and 147 deletions

View file

@ -7,6 +7,7 @@
(ns app.test-helpers
(:require
[app.common.data :as d]
[app.common.flags :as flags]
[app.common.pages :as cp]
[app.common.spec :as us]
[app.common.uuid :as uuid]
@ -336,9 +337,15 @@
[data]
(fn
([key]
(get data key (get @cf/config key)))
(get data key (get cf/config key)))
([key default]
(get data key (get @cf/config key default)))))
(get data key (get cf/config key default)))))
(defmacro with-mocks
[rebinds & body]
`(with-redefs-fn ~rebinds
(fn [] ~@body)))
(defn reset-mock!
[m]