Page create with a relative path forces an absolute path.

This commit is contained in:
Dustin DeYoung
2013-05-26 10:03:23 -04:00
parent a88314e061
commit 1147186b4c
4 changed files with 62 additions and 23 deletions
+12
View File
@@ -9,5 +9,17 @@ context "Precious::Helpers" do
assert_equal 'Mordor', extract_path('Mordor/Sauron')
assert_equal 'Mordor/Sauron', extract_path('Mordor/Sauron/Evil')
end
test "clean path without leading slash" do
assert_equal '/Mordor', clean_path('Mordor')
end
test "clean path with leading slash" do
assert_equal '/Mordor', clean_path('/Mordor')
end
test "clean path with double leading slash" do
assert_equal '/Mordor', clean_path('//Mordor')
end
end