Skip to content

Commit

Permalink
added test for join
Browse files Browse the repository at this point in the history
  • Loading branch information
yogthos committed Apr 4, 2014
1 parent 93ce7f8 commit a6ff9b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/selmer/core_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,12 @@
(is (thrown? Exception (render "{{f|hash:\"foo\"}}" {:f "foo"}))))


(deftest filter-join
(is (= "1, 2, 3, 4"
(render "{{sequence|join:\", \"}}" {:sequence [1 2 3 4]})))
(is (= "1234"
(render "{{sequence|join}}" {:sequence [1 2 3 4]}))))

(deftest filter-count
(is (= "3" (render "{{f|count}}" {:f "foo"})))
(is (= "4" (render "{{f|count}}" {:f [1 2 3 4]})))
Expand Down

0 comments on commit a6ff9b4

Please sign in to comment.