summaryrefslogtreecommitdiff
path: root/html/html_test.go
diff options
context:
space:
mode:
authorAdam Scarr <adam@vektah.net>2017-08-06 17:28:34 +1000
committerAdam Scarr <adam@vektah.net>2017-08-06 17:28:34 +1000
commit2c0c5b628fd0b8e7499574d379b4138630f886d7 (patch)
tree20be82a411649f8f80281c6f73977e0d797858eb /html/html_test.go
parenta65a9325aaebd1499a8e523463cc023124f8536a (diff)
Add String parser
Diffstat (limited to 'html/html_test.go')
-rw-r--r--html/html_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/html/html_test.go b/html/html_test.go
index 6dca6d4..defdc10 100644
--- a/html/html_test.go
+++ b/html/html_test.go
@@ -8,10 +8,10 @@ import (
)
func TestParse(t *testing.T) {
- result, _, err := Parse("<body>hello <b>world</b></body>")
+ result, _, err := Parse(`<body>hello <p color="blue">world</p></body>`)
require.NoError(t, err)
require.Equal(t, Tag{Name: "body", Attributes: map[string]string{}, Body: []Node{
"hello ",
- Tag{Name: "b", Attributes: map[string]string{}, Body: []Node{"world"}},
+ Tag{Name: "p", Attributes: map[string]string{"color": "blue"}, Body: []Node{"world"}},
}}, result)
}