package helpers
import (
"testing"
)
func TestStripHTML(t *testing.T) {
type test struct {
input, expected string
}
data := []test{
{"
strip h1 tag ", "strip h1 tag "},
{"
strip p tag
", " strip p tag \n"},
{" strip br
", " strip br\n"},
}
for i, d := range data {
output := StripHTML(d.input)
if d.expected != output {
t.Errorf("Test %d failed. Expected %q got %q", i, d.expected, output)
}
}
}