add: tests using an actual database

This commit is contained in:
2026-03-29 15:24:09 -07:00
parent 7626b5618a
commit bddfbd4f74
6 changed files with 295 additions and 8 deletions
+3 -2
View File
@@ -13,6 +13,7 @@ import (
v1 "git.tipsy.codes/charles/webstory/pkg/api/webstory/v1"
"github.com/google/uuid"
"github.com/lib/pq"
"google.golang.org/protobuf/types/known/timestamppb"
)
@@ -243,7 +244,7 @@ func (s *DBStory) insert(db *sql.DB) error {
s.Title,
s.Content,
s.Description,
labels,
pq.Array(labels),
s.CreatedAt,
s.UpdatedAt,
etag,
@@ -296,7 +297,7 @@ func (s *DBStory) update(db *sql.DB) error {
s.Title,
s.Content,
s.Description,
labels,
pq.Array(labels),
s.UpdatedAt,
etag,
s.ID,