add symlink failing test

Signed-off-by: Parker Moore <parkrmoore@gmail.com>
This commit is contained in:
Ben Balter 2014-01-06 22:11:13 -05:00 committed by Parker Moore
parent 0acbe95797
commit dfec551cc4
3 changed files with 23 additions and 6 deletions

View File

@ -0,0 +1 @@
../about.html

View File

@ -1,6 +0,0 @@
---
title: About
permalink: /about/
---
About the site

1
test/source/about.html Symbolic link
View File

@ -0,0 +1 @@
/tmp/pages-test

View File

@ -363,6 +363,27 @@ CONTENT
end
context "include tag with parameters" do
context "with symlink'd include" do
setup do
content = <<CONTENT
---
title: Include symlink
---
{% include about.html %}
CONTENT
create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
end
should "not allow symlink includes" do
File.open("/tmp/pages-test", 'w') { |file| file.write("SYMLINK TEST") }
assert_no_match /SYMLINK TEST/, @result
end
end
context "with one parameter" do
setup do
content = <<CONTENT