Permalink
Browse files

Add a test for #21

  • Loading branch information...
1 parent bf63eba commit 1907628621459491c7f9bf76b6a30b0adcb5ebb3 Michael Klishin committed Feb 17, 2013
Showing with 10 additions and 1 deletion.
  1. +10 −1 test/clojurewerkz/neocons/rest/test/indexing_test.clj
@@ -80,7 +80,16 @@
n (nodes/create {:value s})
_ (nodes/add-to-index (:id n) (:name idx) k s)
n' (nodes/find-one (:name idx) k s)]
- (is (= "a value with spaces" (-> n' :data :value)))))
+ (is (= s (-> n' :data :value)))))
+
+(deftest ^{:indexing true} test-adding-a-node-to-index-with-value-with-colons
+ (let [idx (nodes/create-index "things")
+ s "a:value with spaces"
+ k "a:key with spaces"
+ n (nodes/create {:value s})
+ _ (nodes/add-to-index (:id n) (:name idx) k s)
+ n' (nodes/find-one (:name idx) k s)]
+ (is (= s (-> n' :data :value)))))
(deftest ^{:indexing true} test-adding-a-node-to-index-as-unique
(let [idx (nodes/create-index "uris")

0 comments on commit 1907628

Please sign in to comment.