This commit is contained in:
jay brown
2025-08-04 10:54:22 -07:00
parent 582e5b77c0
commit 56fb9b4ab6
20 changed files with 1026 additions and 28 deletions
+1
View File
@@ -82,6 +82,7 @@ func (s *Service) submitCreate(ctx context.Context, params *createDocumentParams
createid, err := s.cfg.GetDBQueries().CreateDocument(ctx, &repository.CreateDocumentParams{
Clientid: params.Key.ClientID,
Hash: params.Hash,
BatchID: nil,
})
if err != nil {
return err
+2 -2
View File
@@ -52,7 +52,7 @@ func TestCreate(t *testing.T) {
pgxmock.NewRows([]string{"id"}),
)
pool.ExpectBegin()
pool.ExpectQuery("name: CreateDocument :one").WithArgs(doc.ClientID, doc.Hash).
pool.ExpectQuery("name: CreateDocument :one").WithArgs(doc.ClientID, doc.Hash, (*uuid.UUID)(nil)).
WillReturnRows(
pgxmock.NewRows([]string{"id"}).
AddRow(doc.ID),
@@ -235,7 +235,7 @@ func TestSubmitCreate(t *testing.T) {
}
pool.ExpectBegin()
pool.ExpectQuery("name: CreateDocument :one").WithArgs(doc.ClientID, doc.Hash).
pool.ExpectQuery("name: CreateDocument :one").WithArgs(doc.ClientID, doc.Hash, (*uuid.UUID)(nil)).
WillReturnRows(
pgxmock.NewRows([]string{"id"}).
AddRow(doc.ID),