Commits

Miki Tebeka committed 03b8446

Test

  • Participants
  • Parent commits 2ac1dff

Comments (0)

Files changed (1)

File test/uuid_test.clj

+(ns uuid-test
+  (:use [clojure.test]
+        [uuid]))
+
+(deftest uuid-test
+  (is (instance? java.lang.String (uuid)))
+  (is (instance? java.lang.String (re-find #"^[0-9a-f-]+$" (uuid))))
+  (is (= (count (uuid)) 36)))
+
+(deftest name-uuid-test
+  (is (instance? java.lang.String (name-uuid "foo")))
+  (is (instance? java.lang.String (re-find #"^[0-9a-f-]+$" (name-uuid "blah"))))
+  (is (= (count (name-uuid "zzz")) 36))
+  (is (= (name-uuid "same") (name-uuid "same"))))