Add additional tests to verify that existing filenames are processed properly and not cannonicalized

This commit is contained in:
Arran Cudbard-Bell
2011-06-27 11:45:55 +02:00
parent 6926746624
commit 7c799323a5
16 changed files with 137 additions and 7 deletions
+20
View File
@@ -25,7 +25,27 @@ context "Page" do
test "get existing page case insensitive" do
assert_equal @wiki.page('Bilbo Baggins').path, @wiki.page('bilbo baggins').path
end
test "get existing page with hyphen" do
assert_equal @wiki.page('Bilbo Baggins').path, @wiki.page('Bilbo-Baggins').path
end
test "get existing page with underscore" do
assert_nil @wiki.page('Bilbo_Baggins')
end
test "get existing page where filename contains whitespace, with hypen" do
assert_equal @wiki.page('Samwise Gamgee').path, @wiki.page('Samwise-Gamgee').path
end
test "get existing page where filename contains whitespace, with underscore" do
assert_equal @wiki.page('Samwise Gamgee').path, @wiki.page('Samwise_Gamgee').path
end
test "get existing page where filename contains whitespace, with whitespace" do
assert_equal @wiki.page('Samwise Gamgee').path, @wiki.page('Samwise Gamgee').path
end
test "get nested page" do
page = @wiki.page('Eye Of Sauron')
assert_equal 'Mordor/Eye-Of-Sauron.md', page.path