diff options
| author | Asko Nõmm <asko@nmm.ee> | 2025-10-19 18:12:40 +0300 |
|---|---|---|
| committer | Asko Nõmm <asko@nmm.ee> | 2025-10-19 18:12:40 +0300 |
| commit | ad98bfddb09c6be641ff6755bb8caefc50f1636d (patch) | |
| tree | 205661db6741879a8b04c8023350fcb0a07cf0e6 /test/dompa/coordinates_test.cljc | |
| parent | 9276f08031242c13ee25c8f89c22e4f65cff004b (diff) | |
#3: Fixes an issue where if the attribute value contained forward slashes, it would break the attribute parsing.
Diffstat (limited to 'test/dompa/coordinates_test.cljc')
| -rw-r--r-- | test/dompa/coordinates_test.cljc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/dompa/coordinates_test.cljc b/test/dompa/coordinates_test.cljc index 79248e3..1a69114 100644 --- a/test/dompa/coordinates_test.cljc +++ b/test/dompa/coordinates_test.cljc @@ -115,6 +115,16 @@ coordinates/compose coordinates/unify coordinates/->nodes)))) + + (testing "Parse attributes with forward slashes in them" + (is (= [{:node/name :meta, + :node/attrs {:name "route-pattern", + :content "/:user_id/:repository", + :data-turbo-transient true}}] + (-> "<meta name=\"route-pattern\" content=\"/:user_id/:repository\" data-turbo-transient>" + coordinates/compose + coordinates/unify + coordinates/->nodes)))) (testing "Create nodes with attributes" (is (= [{:node/name :div |
