Skip to content

Commit 6a8908f

Browse files
committed
Show nick in notes references in weekly report
1 parent 2f77502 commit 6a8908f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

internal/summary/summary_test.go

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package summary
2+
3+
import (
4+
"context"
5+
"fmt"
6+
"goirc/db/model"
7+
db "goirc/model"
8+
"testing"
9+
"time"
10+
)
11+
12+
func TestHTML(t *testing.T) {
13+
q := model.New(db.DB)
14+
s := New(q, time.Now().Add(-time.Hour*24*7), time.Now().Add(-time.Hour*24*0))
15+
// s.SetCompleteFn(func(context.Context, string, string, string) (string, error) {
16+
// return "mock ai completed text", nil
17+
// })
18+
// s.SetGetTitleFn(func(string) (string, error) {
19+
// return "mock title", nil
20+
// })
21+
22+
err := s.LoadAll(context.TODO())
23+
if err != nil {
24+
t.Fatal(err)
25+
}
26+
27+
bytes, err := s.HTML(context.TODO())
28+
if err != nil {
29+
t.Fatal(err)
30+
}
31+
32+
fmt.Printf("%s\n", string(bytes))
33+
}

0 commit comments

Comments
 (0)