2024-01-05 14:31:44 +01:00
|
|
|
(ns rss-thread-watch.utils-test
|
|
|
|
(:require [clojure.test :refer :all]
|
|
|
|
[rss-thread-watch.utils :refer :all]))
|
|
|
|
|
2024-01-06 06:05:21 +01:00
|
|
|
(def first-map {:a :b
|
|
|
|
:c "c"})
|
|
|
|
(def empty-map {})
|
2024-01-05 14:31:44 +01:00
|
|
|
|
|
|
|
(deftest map-deep-merge-missing-test
|
2024-01-06 06:05:21 +01:00
|
|
|
(testing "Default values in place of missing keys"
|
|
|
|
(is (= first-map (map-apply-defaults first-map empty-map))
|
|
|
|
"No defaults should return conf map unchanged")
|
|
|
|
(is (= first-map (map-apply-defaults empty-map first-map))
|
|
|
|
"Empty map should be completely replaced by defaults")))
|