summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--helpers/content_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/helpers/content_test.go b/helpers/content_test.go
index e2bf501d2..53e18e727 100644
--- a/helpers/content_test.go
+++ b/helpers/content_test.go
@@ -50,6 +50,14 @@ func TestTrimShortHTML(t *testing.T) {
}
}
+func BenchmarkTrimShortHTML(b *testing.B) {
+ c := newTestContentSpec(nil)
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ c.TrimShortHTML([]byte("<p>Simple paragraph</p>"))
+ }
+}
+
func TestBytesToHTML(t *testing.T) {
c := qt.New(t)
c.Assert(helpers.BytesToHTML([]byte("dobedobedo")), qt.Equals, template.HTML("dobedobedo"))