Permalink
Browse files

added lowercase and test

  • Loading branch information...
1 parent 85f433c commit 29051c8f6d858cfaf5d7307488535883fff159b0 Sun Ning committed Mar 7, 2013
Showing with 7 additions and 0 deletions.
  1. +3 −0 src/hbs/ext.clj
  2. +4 −0 test/hbs/ext_test.clj
View
@@ -32,3 +32,6 @@
(defhelper uppercase [^Object ctx ^Options options]
(clojure.string/upper-case ctx))
+
+(defhelper lowercase [^Object ctx ^Options options]
+ (clojure.string/lower-case ctx))
View
@@ -25,3 +25,7 @@
(deftest test-uppercase
(let [tpl "{{uppercase tom.cat}}"]
(is (= "HELLO" (render tpl {:tom {:cat "hello"}})))))
+
+(deftest test-lowercase
+ (let [tpl "{{lowercase tom.cat}}"]
+ (is (= "hello" (render tpl {:tom {:cat "HELLO"}})))))

0 comments on commit 29051c8

Please sign in to comment.