add: tests using an actual database
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user