every note associated with it's pid now
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
(is (= note (:note get-response)))
|
||||
(is (= (:longURL post-response) (:longURL get-response) note-url))
|
||||
(is (= (:shortURL post-response) (:shortURL get-response)))
|
||||
(is (= (:publisher get-response) pid))
|
||||
(is (= "1" (get-in get-response [:statistics :views])))
|
||||
(isnt (get-in get-response [:statistics :edited]))
|
||||
(is (= "2" (get-in (get-note (:noteID post-response)) [:statistics :views])))))
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
(is (short-url-exists? url))
|
||||
(is (= url url2))
|
||||
(is (= metadata (resolve-url url)))
|
||||
(is (not (do
|
||||
(is (not (do
|
||||
(delete-short-url url)
|
||||
(short-url-exists? url))))))
|
||||
(testing "of correct note creation"
|
||||
(is (= (do
|
||||
(add-note (build-key date test-title) test-note)
|
||||
(add-note (build-key date test-title) test-note "testPID")
|
||||
(get-note (build-key date test-title)))
|
||||
test-note))
|
||||
(is (= "1" (get-note-views (build-key date test-title))))
|
||||
@@ -38,7 +38,7 @@
|
||||
"2")))
|
||||
(testing "of note update"
|
||||
(is (= (do
|
||||
(add-note (build-key date test-title) test-note "12345qwert")
|
||||
(add-note (build-key date test-title) test-note "testPID" "12345qwert")
|
||||
(get-note (build-key date test-title)))
|
||||
test-note))
|
||||
(is (valid-password? (build-key date test-title) "12345qwert"))
|
||||
@@ -60,7 +60,7 @@
|
||||
(testing "of note existence"
|
||||
(is (note-exists? (build-key date test-title)))
|
||||
(is (not (do
|
||||
(delete-note (build-key date test-title))
|
||||
(delete-note (build-key date test-title))
|
||||
(note-exists? (build-key date test-title)))))
|
||||
(is (not (note-exists? (build-key [2013 06 03] test-title))))
|
||||
(is (not (note-exists? (build-key date "some title")))))))
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
(def test-note "# This is a test note.\nHello _world_. Motörhead, тест.")
|
||||
|
||||
(defn create-testnote-fixture [f]
|
||||
(add-note (build-key date test-title) test-note)
|
||||
(add-note (build-key date test-title) test-note "testPID")
|
||||
(f)
|
||||
(delete-note (build-key date test-title)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user