Skip to content

Commit

Permalink
Marked all label tests as edge-features.
Browse files Browse the repository at this point in the history
  • Loading branch information
ducky427 committed Oct 8, 2013
1 parent 9dc3f4d commit 8aed7d4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/clojurewerkz/neocons/rest/test/labels_test.clj
Expand Up @@ -6,45 +6,45 @@

(neorest/connect! "http://localhost:7474/db/data/")

(deftest test-creating-one-label
(deftest ^{:edge-features true} test-creating-one-label
(let [n (nodes/create)]
(is (= (labels/get-all-labels n) []))
(labels/add n "MyLabel")
(is (= (labels/get-all-labels n) ["MyLabel"]))))

(deftest test-creating-multiple-label
(deftest ^{:edge-features true} test-creating-multiple-label
(let [n (nodes/create)]
(labels/add n ["MyLabel", "MyOtherLabel"])
(is (= (labels/get-all-labels n) ["MyLabel", "MyOtherLabel"]))))

(deftest test-creating-invalid-label
(deftest ^{:edge-features true} test-creating-invalid-label
(let [n (nodes/create)]
(is (thrown-with-msg? Exception #"null value not supported"
(labels/add n nil)))))

(deftest test-replacing-label
(deftest ^{:edge-features true} test-replacing-label
(let [n (nodes/create)]
(labels/add n "MyLabel")
(labels/replace n ["MyOtherLabel", "MyThirdLabel"])
(is (= (labels/get-all-labels n) ["MyOtherLabel", "MyThirdLabel"]))))

(deftest test-deleting-label
(deftest ^{:edge-features true} test-deleting-label
(let [n (nodes/create)]
(labels/add n "MyLabel")
(labels/remove n "MyLabel")
(is (= (labels/get-all-labels n) []))))

(deftest test-get-all-nodes-with-label
(deftest ^{:edge-features true} test-get-all-nodes-with-label
(let [n (nodes/create)]
(labels/add n "MyLabel")
(is (some #(= (:id %) (:id n)) (labels/get-all-nodes "MyLabel")))))

(deftest test-get-all-nodes-with-label-and-property
(deftest ^{:edge-features true} test-get-all-nodes-with-label-and-property
(let [n (nodes/create {"name" "bob ross"})]
(labels/add n "MyLabel")
(is (some #(= (:id %) (:id n)) (labels/get-all-nodes "MyLabel" "name" "bob ross")))))

(deftest test-get-all-labels
(deftest ^{:edge-features true} test-get-all-labels
(let [n (nodes/create)]
(labels/add n "MyLabel")
(is (some #(= % "MyLabel") (labels/get-all-labels)))))

0 comments on commit 8aed7d4

Please sign in to comment.