28 lines
625 B
Go
28 lines
625 B
Go
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)
|
||
}
|
||
}
|