Files
accounting/pkg/invoice/report/markdown_test.go

28 lines
625 B
Go
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package report
import (
"testing"
)
func TestMarkdownCheckboxesToHTML(t *testing.T) {
input := `
The application must support English and German.
## TODO's
- [x] Add multiple languages to Pages
- [x] Add multiple languages to Events`
expected := `
The application must support English and German.
## TODO's
- <input type="checkbox" checked disabled> Add multiple languages to Pages
- <input type="checkbox" checked disabled> Add multiple languages to Events`
output := markdownCheckboxesToHTML(input)
if output != expected {
t.Errorf("unexpected output:\nGot:\n%s\n\nExpected:\n%s", output, expected)
}
}