failing test
Signed-off-by: Parker Moore <parkrmoore@gmail.com>
This commit is contained in:
parent
750a56d1fe
commit
9e796d0627
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
permalink: /%2e%2e/baddie.html
|
||||||
|
---
|
||||||
|
|
||||||
|
# Test
|
|
@ -103,6 +103,15 @@ class TestPost < Test::Unit::TestCase
|
||||||
assert_equal "/my_category/permalinked-post", @post.url
|
assert_equal "/my_category/permalinked-post", @post.url
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "not be writable outside of destination" do
|
||||||
|
post = setup_post("2014-01-06-permalink-traversal.md")
|
||||||
|
do_render(post)
|
||||||
|
post.write(dest_dir)
|
||||||
|
|
||||||
|
assert !File.exist?(File.expand_path("../baddie.html", dest_dir))
|
||||||
|
assert File.exist(File.expand_path("/baddie.html", dest_dir))
|
||||||
|
end
|
||||||
|
|
||||||
context "with CRLF linebreaks" do
|
context "with CRLF linebreaks" do
|
||||||
setup do
|
setup do
|
||||||
@real_file = "2009-05-24-yaml-linebreak.markdown"
|
@real_file = "2009-05-24-yaml-linebreak.markdown"
|
||||||
|
|
Loading…
Reference in New Issue