|
|
@ -1,6 +1,7 @@ |
|
|
|
package model |
|
|
|
|
|
|
|
import ( |
|
|
|
"fmt" |
|
|
|
"net/url" |
|
|
|
"testing" |
|
|
|
"time" |
|
|
@ -29,7 +30,6 @@ var testPage = Page{ |
|
|
|
FictionalDate: fictionalDate, |
|
|
|
PublishDate: postingDate, |
|
|
|
EditDate: editDate, |
|
|
|
Dated: true, |
|
|
|
Published: true, |
|
|
|
Unlisted: false, |
|
|
|
Specific: false, |
|
|
@ -262,6 +262,18 @@ func TestPage(t *testing.T) { |
|
|
|
assertEquals(t, "page.Content()", string(content), "<h1>Returning Va’ynna’s Omni-Tool</h1>\n\n<p>Additional Content is additional</p>\n") |
|
|
|
}) |
|
|
|
|
|
|
|
t.Run("ContentSpecial", func(t *testing.T) { |
|
|
|
page := Page{Source: "Husarskie Anioły win the EUCC 2175", Type: "Markdown"} |
|
|
|
|
|
|
|
content, err := page.Content() |
|
|
|
if err != nil { |
|
|
|
t.Errorf("page.Content: %s", err) |
|
|
|
} |
|
|
|
|
|
|
|
t.Log(string(content)) |
|
|
|
assertEquals(t, "page.Content()", string(content), fmt.Sprintf("<p>%s</p>\n", page.Source)) |
|
|
|
}) |
|
|
|
|
|
|
|
t.Run("WikiURL", func(t *testing.T) { |
|
|
|
t.Skip("To be implemented") |
|
|
|
}) |
|
|
|