Sitelet https://github.com/francoisdevlin/compojure/commit/c996e3cf43c61d05cdb6ea416860d7427d2740ec
Skip to content

Commit c996e3c

Browse files
author
Jim
committed
Added multiple keyword match to facts
1 parent 2288683 commit c996e3c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎test/compojure/http.clj‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
(= (match-route (compile-route route) path)
2020
{:x "foo"}))
2121

22+
(fact "Routes can contain the same keyword many times"
23+
[[route path] {"/:x/:x/:x" "/foo/bar/baz"
24+
"/a/:x/b/:x.:x" "/a/foo/b/bar.baz"}]
25+
(= (match-route (compile-route route) path)
26+
{:x ["foo" "bar" "baz"]}))
27+
2228
(fact "Routes can match wildcards"
2329
[[route path] {"/*" "/foo/bar.txt"
2430
"/baz/*" "/baz/foo/bar.txt"

0 commit comments

Comments
 (0)