summaryrefslogtreecommitdiff
path: root/src/post/post_test.go
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2023-01-18 20:15:12 +0100
committerBrian Picciano <mediocregopher@gmail.com>2023-01-18 20:15:12 +0100
commite7b5b55f6718b25a437a891a06a26c21384b6818 (patch)
tree6c95d222f00806e2d3b335bfd0d04c4be34c740f /src/post/post_test.go
parent4878495914fb9701bedc242eb5087394138c8ee3 (diff)
Add format column to post tables
Diffstat (limited to 'src/post/post_test.go')
-rw-r--r--src/post/post_test.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/post/post_test.go b/src/post/post_test.go
index 7e87200..4c7f517 100644
--- a/src/post/post_test.go
+++ b/src/post/post_test.go
@@ -37,9 +37,10 @@ func TestNewID(t *testing.T) {
func testPost(i int) Post {
istr := strconv.Itoa(i)
return Post{
- ID: istr,
- Title: istr,
- Body: istr,
+ ID: istr,
+ Title: istr,
+ Body: istr,
+ Format: FormatMarkdown,
}
}
@@ -108,7 +109,7 @@ func TestStore(t *testing.T) {
post.Tags = []string{"foo", "bar"}
first, err := h.store.Set(post, now)
- assert.NoError(t, err)
+ assert.NoError(t, err, "post:%+v", post)
assert.True(t, first)
gotPost, err := h.store.GetByID(post.ID)
@@ -130,6 +131,7 @@ func TestStore(t *testing.T) {
post.Series = "whatever"
post.Body = "anything"
post.Tags = []string{"bar", "baz"}
+ post.Format = FormatGemtext
first, err = h.store.Set(post, newNow)
assert.NoError(t, err)