last bugs fixed
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
(def pid "somePlugin")
|
||||
(def pid2 "somePlugin2")
|
||||
(def note-title (str (apply print-str (get-date)) " hello-world-this-is-a-test-note"))
|
||||
(def note-url (str "/" (apply str (interpose "/" (get-date))) "/hello-world-this-is-a-test-note"))
|
||||
(def note-url (str (apply str (interpose "/" (get-date))) "/hello-world-this-is-a-test-note"))
|
||||
(defn substring? [a b] (not (= nil (re-matches (re-pattern (str "(?s).*" a ".*")) b))))
|
||||
|
||||
(defmacro isnt [arg] `(is (not ~arg)))
|
||||
|
||||
@@ -48,6 +48,25 @@
|
||||
(delete-note (build-key date title))
|
||||
(not (note-exists? (build-key date title))))))))
|
||||
|
||||
(deftest note-creation-utf
|
||||
(let [session-key (create-session)
|
||||
date (get-date)
|
||||
title "радуга"
|
||||
note "# Радуга\nкаждый охотник желает знать, где сидят фазаны."
|
||||
[year month day] date]
|
||||
(testing "Note creation with UTF8 symbols"
|
||||
(is (has-status
|
||||
(send-request
|
||||
[:post "/post-note"]
|
||||
{:session session-key
|
||||
:note note
|
||||
:signature (get-signature session-key note)}) 302))
|
||||
(is (note-exists? (build-key date title)))
|
||||
(is (substring? "знать" ((send-request (url year month day title)) :body)))
|
||||
(is (do
|
||||
(delete-note (build-key date title))
|
||||
(not (note-exists? (build-key date title))))))))
|
||||
|
||||
(deftest note-update
|
||||
(let [session-key (create-session)
|
||||
date (get-date)
|
||||
|
||||
Reference in New Issue
Block a user