mirror of
https://github.com/journeyman-cc/smeagol.git
synced 2026-04-13 02:05:07 +00:00
Fixed a nasty breaking bug when the side bar file wasn't named as expected!
This commit is contained in:
parent
2fd03caade
commit
a8929894d4
3 changed files with 28 additions and 8 deletions
13
test/smeagol/test/util.clj
Normal file
13
test/smeagol/test/util.clj
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
(ns smeagol.test.util
|
||||
(:use clojure.test
|
||||
ring.mock.request
|
||||
smeagol.util))
|
||||
|
||||
(deftest test-local-links
|
||||
(testing "Rewriting of local links"
|
||||
(is (= (local-links nil) no-text-error) "Should NOT fail with a no pointer exception!")
|
||||
(is (= (local-links "") "") "Empty string should pass through unchanged.")
|
||||
(is (= (local-links "[[froboz]]") "<a href='wiki?page=froboz'>froboz</a>") "Local link should be rewritten.")
|
||||
(let [text (str "# This is a heading"
|
||||
"[This is a foreign link](http://to.somewhere)")]
|
||||
(is (= (local-links text) text) "Foreign links should be unchanged"))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue