test/libdolt/git/repository_test.rb in libdolt-0.33.13 vs test/libdolt/git/repository_test.rb in libdolt-0.33.14

- old
+ new

@@ -161,9 +161,30 @@ :message => "" }] }] assert_equal expected, log end + + it "escapes summary and message" do + log = @repository.tree_history("52d702", "") + + expected = { + :type => :blob, + :oid => "e2bd58a7c13c12a39fe882b773e00b66438a9451", + :filemode => 33188, + :name => "README.org", + :history => [{ + :oid => "52d7029425ff0556ff659e570f71393b6c28ac9c", + :author => { :name => "Foo O'Bar", + :email => 'script src="foobar.js"/' }, + :summary => "I'm an <script>unsafe</script> summary", + :date => Time.parse("2014-01-09 13:16:03 +0200"), + :message => " I'm a <script>scary</script> message" + }] + } + + assert_equal expected, log[1] + end end describe "#readmes" do it "returns single readme" do def @repository.tree(ref, path)