Skip to content

Commit 855ff95

Browse files
committed
contmeta: fix content test
1 parent 2db11cf commit 855ff95

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

content/page_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package content
66

77
import (
88
"testing"
9+
"time"
910

1011
"cogentcore.org/core/content/bcontent"
1112
"github.com/stretchr/testify/assert"
@@ -14,6 +15,9 @@ import (
1415
func TestNewPage(t *testing.T) {
1516
pg, err := bcontent.NewPage(exampleContent, "button.md")
1617
assert.NoError(t, err)
18+
dstr := "2026-05-01"
19+
date, err := time.Parse(time.DateOnly, dstr)
20+
assert.NoError(t, err)
1721
assert.Equal(t, bcontent.Page{
1822
Source: exampleContent,
1923
Filename: "button.md",
@@ -22,7 +26,9 @@ func TestNewPage(t *testing.T) {
2226
Title: "Button",
2327
Categories: []string{"Widgets"},
2428
Authors: "Bea A. Author<sup>1</sup> and Test Ing Name<sup>2</sup>",
25-
Affiliations: "<sup>1</sup>University of Somwhere <sup>2</sup>University of Elsewhere",
29+
Affiliations: "<sup>1</sup>University of Somewhere <sup>2</sup>University of Elsewhere",
2630
Abstract: "The button is an essential element of any GUI framework, with the capability of triggering actions of any sort. Actions are very important because they allow people to actually do something.",
31+
DateString: dstr,
32+
Date: date,
2733
}, *pg)
2834
}

0 commit comments

Comments
 (0)